/* ==========================================================================
   Hexelia — homepage
   Palette e impianto tipografico derivati dal design originale.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */
:root {
  --navy:        #2A3570;
  --navy-deep:   #1E2653;
  --navy-hover:  #202a5c;
  --magenta:     #E5197F;
  --magenta-dk:  #C4126B;
  --pink:        #F06EA9;

  --bg:          #F5F6F9;
  --surface:     #FFFFFF;
  --surface-alt: #E9EBF3;

  --text:        #1E2653;
  --text-muted:  #5B6178;
  --text-soft:   #8B90A6;

  --line:        rgba(30, 38, 83, .12);
  --line-strong: rgba(30, 38, 83, .30);

  /* Font display: 'Fedra Sans Std' entra in gioco automaticamente
     se in futuro verranno aggiunti i file .woff2 sotto licenza. */
  --font-display: 'Fedra Sans Std', 'PT Sans', system-ui, sans-serif;
  --font-body:    'PT Sans', system-ui, -apple-system, sans-serif;
  --font-narrow:  'PT Sans Narrow', 'PT Sans', system-ui, sans-serif;

  --container: 1240px;
  --gutter: 40px;
  --radius: 3px;
}

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

body, h1, h2, h3, h4, p, figure { margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--navy); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.015em;
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --- Layout helpers ----------------------------------------------------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-top: clamp(56px, 8vw, 96px); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 14px;
}

.meta {
  font-family: var(--font-narrow);
  font-size: 13.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--magenta);
  color: #fff;
  padding: 12px 20px;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  padding: 15px 28px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary { background: var(--magenta); color: #fff; }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--magenta-dk); color: #fff; }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover, .btn--navy:focus-visible { background: var(--magenta); color: #fff; }

.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover, .btn--light:focus-visible { background: var(--surface-alt); color: var(--navy); }

.btn--ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: #fff; background: rgba(255, 255, 255, .1); }

.btn--outline {
  font-size: 14.5px;
  padding: 10px 18px;
  border-color: var(--line-strong);
  color: var(--navy);
}
.btn--outline:hover, .btn--outline:focus-visible { background: var(--navy); color: #fff; border-color: var(--navy); }

.link-more {
  font-size: 15px;
  font-weight: 700;
  color: var(--magenta);
  white-space: nowrap;
}
.link-more:hover, .link-more:focus-visible { color: var(--navy); }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(30, 38, 83, .1);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 34px;
  height: 84px;
}

.site-header__logo img { height: 42px; width: auto; }

.site-nav ul {
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  font-size: 17px;
  color: var(--text-muted);
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--magenta); }

.site-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.phone-link {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--magenta);
  white-space: nowrap;
}
.phone-link:hover, .phone-link:focus-visible { color: var(--magenta-dk); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  padding: 0;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--navy);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  margin-inline: auto;
  content: '';
  position: relative;
}
.nav-toggle span::before { top: -6px; position: absolute; }
.nav-toggle span::after  { top: 6px;  position: absolute; }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0 0 0 52%;
  opacity: .4;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(102deg,
    var(--navy) 0%, var(--navy) 46%,
    rgba(42, 53, 112, .55) 66%, rgba(42, 53, 112, .3) 100%);
}

.hero__inner {
  position: relative;
  padding-block: clamp(64px, 9vw, 104px) clamp(72px, 10vw, 112px);
}

.hero__content {
  max-width: 700px;
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
}

.hero .eyebrow { color: var(--pink); margin-bottom: 24px; }

.hero h1 {
  font-size: clamp(2rem, 1.1rem + 3.4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.02em;
}

.hero__lead {
  margin-top: 26px;
  max-width: 560px;
  font-size: clamp(1.05rem, .95rem + .5vw, 1.375rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, .85);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* --- Trust bar ---------------------------------------------------------- */
.trust {
  background: var(--navy-deep);
  color: #fff;
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-block: 32px;
}
.trust__value {
  display: block;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--pink);
}
.trust__label {
  font-size: 18px;
  color: rgba(255, 255, 255, .65);
}

/* --- Section headers ---------------------------------------------------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 38px;
}
.section-head h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.625rem);
  max-width: 600px;
}

/* --- Audience cards ----------------------------------------------------- */
.audience {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.audience__card {
  background: var(--surface);
  border: 1px solid rgba(30, 38, 83, .1);
  border-top: 3px solid var(--navy);
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color .18s ease;
}
.audience__card:hover {
  border-color: rgba(229, 25, 127, .35);
  border-top-color: var(--magenta);
}
.audience__card h3 { font-size: 19.5px; line-height: 1.3; letter-spacing: 0; }
.audience__card h3 span {
  display: block;
  font-weight: 400;
  font-size: 16px;
  color: var(--text-muted);
}
.audience__card p {
  font-size: 15px;
  line-height: 1.62;
  color: var(--text-muted);
}
.audience__card .btn--outline { margin-top: auto; align-self: flex-start; }

/* --- Servizi ------------------------------------------------------------ */
.services__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 10px;
}
.services__head h2 { font-size: clamp(1.625rem, 1.2rem + 1.7vw, 2.375rem); }

.services__lead {
  max-width: 660px;
  margin-bottom: 40px;
  font-size: 16.5px;
  color: var(--text-muted);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.services__item {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 168px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  transition: background-color .18s ease, color .18s ease;
}
.services__item:hover, .services__item:focus-visible { background: var(--navy); color: #fff; }
.services__item:hover svg [stroke="#2A3570"] { stroke: #fff; }
.services__item:hover svg [fill="#2A3570"]   { fill: #fff; }

/* --- Network professionisti --------------------------------------------- */
.network {
  margin-top: clamp(56px, 8vw, 96px);
  background: var(--surface);
  border-block: 1px solid rgba(30, 38, 83, .1);
}
.network__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: center;
  padding-block: clamp(56px, 8vw, 88px);
}
.network h2 {
  font-size: clamp(1.625rem, 1.2rem + 1.7vw, 2.375rem);
  margin-bottom: 20px;
}
.network__lead {
  margin-bottom: 34px;
  max-width: 520px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
}
.network__pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.network__pillars > div { background: var(--surface); padding: 22px 24px 24px; }
.network__pillars h3 {
  font-size: 17px;
  margin-bottom: 7px;
  color: var(--navy);
  letter-spacing: 0;
}
.network__pillars p { font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }
.network .btn--navy { margin-top: 32px; }

.network__figure { position: relative; }
.network__figure img {
  width: 100%;
  height: clamp(320px, 40vw, 520px);
  object-fit: cover;
  background: var(--surface-alt);
}
.network__quote {
  position: absolute;
  left: -34px;
  bottom: -34px;
  max-width: 290px;
  background: var(--magenta);
  color: #fff;
  padding: 26px 28px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.32;
}

/* --- Insights ----------------------------------------------------------- */
.insights__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.insights__card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  color: var(--text);
}
.insights__card:hover, .insights__card:focus-visible { color: var(--magenta); }
.insights__thumb {
  height: 200px;
  background: var(--surface-alt);
}
.insights__card h3 { font-size: 19px; line-height: 1.35; letter-spacing: 0; }

/* --- CTA finale --------------------------------------------------------- */
.cta {
  margin-top: clamp(56px, 8vw, 96px);
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta__mark {
  position: absolute;
  left: -10%;
  top: 0;
  height: 100%;
  width: 60%;
  opacity: .35;
  pointer-events: none;
}
.cta__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 64px;
  align-items: center;
  padding-block: clamp(56px, 7vw, 80px);
}
.cta h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.625rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.cta__lead {
  font-size: 17.5px;
  color: rgba(255, 255, 255, .8);
  max-width: 500px;
}
.cta__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, .7);
}
.cta__actions a[href^="tel"] { color: #fff; font-weight: 700; }
.cta__actions a[href^="mailto"] { color: var(--pink); text-decoration: underline; }
.cta__actions a:hover, .cta__actions a:focus-visible { color: var(--pink); }
.cta__actions a[href^="mailto"]:hover { color: #fff; }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid rgba(30, 38, 83, .1);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.25fr .7fr .95fr .95fr;
  gap: 48px;
  padding-block: 60px 26px;
}
.site-footer img { height: 38px; width: auto; margin-bottom: 18px; }
.site-footer p, .site-footer span, .site-footer a {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
}
.site-footer a:hover, .site-footer a:focus-visible { color: var(--magenta); }
.site-footer h4 {
  font-family: var(--font-narrow);
  font-size: 13.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__stack { display: grid; gap: 14px; }
.footer__stack strong { color: var(--text); }

.social { display: flex; gap: 10px; margin-top: 22px; }
.social a {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(30, 38, 83, .2);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  transition: background-color .18s ease, color .18s ease;
}
.social a:hover, .social a:focus-visible { background: var(--navy); color: #fff; }

.site-footer__legal {
  border-top: 1px solid var(--line);
  padding-block: 20px;
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.site-footer__legal, .site-footer__legal a { font-size: 13px; color: var(--text-soft); }
.site-footer__legal nav { display: flex; gap: 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 980px) {
  :root { --gutter: 28px; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 22px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { display: block; padding: 12px 0; font-size: 18px; }

  .nav-toggle { display: block; }
  .site-header__actions { display: none; }

  .hero__media { inset: 0; opacity: .22; }
  .hero__scrim {
    background: linear-gradient(180deg,
      rgba(42, 53, 112, .92) 0%, rgba(42, 53, 112, .82) 100%);
  }

  .trust__grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }

  .audience { grid-template-columns: 1fr; }

  .network__inner { grid-template-columns: 1fr; gap: 48px; }
  .network__figure { margin-bottom: 34px; }
  .network__quote { left: 0; bottom: -24px; }

  .insights__grid { grid-template-columns: 1fr 1fr; }

  .cta__inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .services__item { min-height: 148px; padding: 22px 18px 26px; font-size: 15px; }
  .insights__grid { grid-template-columns: 1fr; }
  .network__pillars { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 34px; }
  .site-footer__legal { flex-direction: column; }
  .hero__actions .btn { width: 100%; text-align: center; }
  .eyebrow { font-size: 15px; }
}
