:root{
  --ink: #1D1F13;
  --white: #FFFFFF;
  --surface-muted: #F8F8F6;
  --surface-border: #E3E4DE;
  --pink: #E53A88;
  --pink-light: #EB67A5;
  --hover-navy: #113292;
  --blue-start: #39529E;
  --blue-end: #123292;
  --navy: #113292;
  --slate: #63665C;

  --font-display: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-w: 1160px;
  --radius: 16px;
  --radius-pill: 100px;
}

html{ font-size: 17.5px; }

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
h1, h2, h3{ font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; margin: 0; }
p{ margin: 0 0 1em; }
p:last-child{ margin-bottom: 0; }
strong{ color: var(--ink); }

.wrap{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

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

/* pill button with circular arrow icon, matches the live site's CTAs */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 4px 4px 4px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn .icon{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  background: var(--white);
  transition: background 0.2s ease;
}
.btn .icon svg{ width: 16px; height: 16px; stroke: var(--ink); transition: stroke 0.2s ease; }

/* Primary: pink by default, navy on hover (matches the live site) */
.btn-primary{
  background: var(--pink);
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-primary:hover{
  background: var(--hover-navy);
  color: var(--white);
}
.btn-primary:hover .icon{ background: var(--white); }
.btn-primary:hover .icon svg{ stroke: var(--hover-navy); }

/* Light: white pill used on the dark contact panel */
.btn-light{
  background: var(--white);
  color: var(--ink);
  transition: background 0.2s ease;
}
.btn-light .icon{ background: var(--ink); }
.btn-light .icon svg{ stroke: var(--white); }
.btn-light:hover{ background: var(--surface-muted); }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 22px 20px 0;
}
.header-inner{
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(227, 228, 222, 0.8);
  border-radius: var(--radius-pill);
  padding: 16px;
  box-shadow: 0 12px 30px -18px rgba(17, 50, 146, 0.25);
}
.logo-img{
  margin-left: 15px;
  margin-right: 15px;
  height: 20px;
  width: auto;
  display: block;
}

.main-nav{
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 1rem;
  font-weight: 500;
}
.main-nav a{
  color: var(--ink);
  padding: 6px 0;
  transition: color 0.2s ease;
}
.main-nav a:hover{ color: var(--pink); }

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex: none;
}
.nav-toggle span{
  display: block;
  height: 2px;
  width: 22px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav-overlay{
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(248, 248, 246, 0.98);
  backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 100px 32px 60px;
}
.mobile-nav-overlay.open{ display: flex; }
.mobile-nav-overlay a.main-nav-link{
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero-media{
  position: absolute;
  inset: 0;
  z-index: 0;
  mask-image: radial-gradient(60% 52% at 50% 43%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(60% 52% at 50% 43%, #000 0%, transparent 100%);
  opacity: 0.9;
}
.hero-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-inner{
  position: relative;
  z-index: 1;
  padding: 160px 40px 120px;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero h1{
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  line-height: 1.14;
  margin-bottom: 24px;
}
.hero h1 .accent{ color: var(--pink); }
.hero-lead{
  font-size: 1.2rem;
  max-width: 52ch;
  color: var(--slate);
  margin-bottom: 36px;
}

/* ---------- Sections (generic) ---------- */
.section{
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}
.section-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
  mask-image: radial-gradient(60% 54%, #000 1%, transparent 100%);
  -webkit-mask-image: radial-gradient(60% 54%, #000 1%, transparent 100%);
  opacity: 0.5;
}
.section-bg img{ width: 100%; height: 100%; object-fit: cover; }
.section > .wrap{ position: relative; z-index: 1; }

.kicker{
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--slate);
  font-weight: 500;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  margin-bottom: 20px;
}
.section-title{
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-bottom: 20px;
  color: var(--ink);
}
.section-intro{
  font-size: 1.2rem;
  max-width: 62ch;
  color: var(--ink);
}
.section-intro a{
  color: var(--pink);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}
.text-center{ text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Cosa facciamo ---------- */
.pillar-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.pillar{
  background: var(--surface-muted);
  border-radius: var(--radius);
  padding: 32px 32px 40px;
}
.pillar .icon-tile{
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.pillar .icon-tile svg{ width: 20px; height: 20px; stroke: #fff; }
.pillar h3{
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.pillar p{
  color: var(--slate);
  max-width: 42ch;
  font-size: 1.05rem;
}

/* ---------- Chi siamo ---------- */
.section-team{
  background: var(--surface-muted);
}
.team-grid{
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.team-media img{
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  object-fit: cover;
}
.team-copy p{
  color: var(--ink);
}
.team-copy p strong{ color: var(--pink); font-weight: 700; }
.team-copy p + p{ margin-top: 1em; }

/* ---------- Prodotti ---------- */
.product-grid{
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.product-tagline{
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
}
.product-copy p strong{ color: var(--pink); font-weight: 700; }
.product-media img{
  border-radius: var(--radius);
}

/* ---------- Contattaci ---------- */
.section-contact{
  padding-top: 0;
}
.contact-panel{
  background: radial-gradient(40% 60% at 50% 0%, var(--blue-start) 0%, var(--blue-end) 100%);
  border-radius: 32px;
  padding: 90px 40px;
  text-align: center;
  color: #fff;
}
.contact-panel .kicker{
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.contact-panel .section-title{ color: #fff; }
.contact-panel .section-intro{ color: rgba(255,255,255,0.85); margin: 0 auto 32px; }
.contact-panel .section-intro a{ color: #fff; }
.contact-panel .btn{ margin: 0 auto; }

/* ---------- Dove siamo ---------- */
.locations-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
}
.location-card{
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-frame{
  aspect-ratio: 16/9;
}
.map-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.location-card h3{
  font-size: 1.05rem;
  font-weight: 700;
  padding: 20px 24px 4px;
}
.location-card p{
  padding: 0 24px 20px;
  color: var(--slate);
}

/* ---------- Footer ---------- */
.site-footer{
  background: var(--white);
  border-top: 1px solid var(--surface-border);
  padding: 48px 0;
}
.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo{
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--navy);
}
.footer-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--slate);
}
.footer-nav a:hover{ color: var(--pink); }
.linkedin-link{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}
.linkedin-link:hover{ background: var(--pink); color: #fff; }
.legal{
  font-size: 0.78rem;
  color: var(--slate);
  margin: 0;
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid var(--surface-border);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px){
  .header-inner{ padding: 8px; }
  .main-nav{ display: none; }
  .nav-cta{ display: none; }
  .nav-toggle{ display: flex; }

  /* Everything centers on mobile: text, icons, media */
  .section, .hero{ text-align: center; }
  .pillar-grid,
  .team-grid,
  .product-grid,
  .locations-grid{
    grid-template-columns: 1fr;
  }
  .pillar{ display: flex; flex-direction: column; align-items: center; text-align: center; }
  .pillar .icon-tile{ margin-left: auto; margin-right: auto; }
  .pillar p{ margin-left: auto; margin-right: auto; }

  .team-grid, .product-grid{ text-align: center; }
  .team-media, .product-media{ order: -1; margin: 0 auto; }
  .team-copy, .product-copy{ display: flex; flex-direction: column; align-items: center; }
  .team-copy p, .product-copy p{ text-align: center; }

  .locations-grid{ text-align: center; }
  .location-card{ margin: 0 auto; max-width: 480px; }

  .footer-top{ flex-direction: column; align-items: center; text-align: center; }
  .footer-nav{ justify-content: center; }

  .section{ padding: 64px 0; }
  .hero-inner{ padding: 120px 20px 64px; }
  .contact-panel{ padding: 56px 24px; border-radius: 20px; }
  .wrap{ padding: 0 20px; }
}


/* ============================================
   vCard pages (/vcard/*) — simple centered layout,
   ============================================ */
   .vcard-page{
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
  }
  
  .vcard-hero{
    position: relative;
    overflow: hidden;
    padding: 32px 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .vcard-hero-bg{
    position: absolute;
    inset: 0;
    z-index: 0;
  }
  .vcard-hero-bg img{ width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
  .vcard-hero-bg::after{
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(60% 70% at 50% 0%, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 60%),
      linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 55%, #fff 92%);
  }
  
  .vcard-logo-link{
    position: relative;
    z-index: 1;
    display: inline-block;
    margin-bottom: 28px;
  }
  .vcard-logo-link img{ height: 24px; }
  
  .vcard-avatar{
    position: relative;
    z-index: 1;
    width: 176px;
    height: 176px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff;
    box-shadow: 0 10px 30px -10px rgba(17, 50, 146, 0.35);
  }
  .vcard-avatar img{ width: 100%; height: 100%; object-fit: cover; }
  .vcard-avatar .initials{
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 3rem;
    color: var(--navy);
  }
  
  .vcard-info{
    position: relative;
    padding: 20px 24px 8px;
  }
  .vcard-name{
    font-size: 1.9rem;
    margin-bottom: 4px;
  }
  .vcard-role{
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--ink);
    margin-bottom: 6px;
  }
  .vcard-website-link{
    display: inline-block;
    color: #3B82F6;
    text-decoration: underline;
    font-size: 1rem;
    margin-bottom: 24px;
  }
  
  .vcard-linkedin-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #0A66C2;
    margin-bottom: 24px;
  }
  .vcard-linkedin-btn svg{ width: 30px; height: 30px; }
  
  .vcard-plain-link{
    display: block;
    color: var(--ink);
    text-decoration: underline;
    font-size: 1.05rem;
    margin-bottom: 10px;
    word-break: break-word;
  }
  
  .vcard-save-btn{
    display: inline-block;
    margin-top: 18px;
    padding: 16px 40px;
    border-radius: var(--radius-pill);
    background: var(--pink);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    border: 2px solid rgba(17, 50, 146, 0.18);
    transition: background 0.2s ease;
  }
  .vcard-save-btn:hover{ background: var(--hover-navy); }
  
  .vcard-divider{
    border: none;
    border-top: 1px solid var(--surface-border);
    margin: 40px 24px;
  }
  
  /* Francesca Gallini — extra affiliation blocks, same centered language */
  .vcard-bio-section{
    padding: 0 24px 8px;
    text-align: center;
  }
  .vcard-bio-block{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
  }
  .vcard-bio-block:last-child{ margin-bottom: 0; }
  .vcard-bio-icon{
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--surface-muted);
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .vcard-bio-icon img{ width: 100%; height: 100%; object-fit: cover; }
  .vcard-bio-text h4{
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
  }
  .vcard-bio-text p{
    color: var(--slate);
    font-size: 0.92rem;
  }
  
  /* Footer — stacked/centered, no horizontal row like the main site */
  .vcard-footer{
    position: relative;
    padding: 0 24px 48px;
    text-align: center;
  }
  .vcard-footer-logo{ display: inline-block; margin-bottom: 32px; }
  .vcard-footer-logo img{ height: 22px; }
  .vcard-footer-nav{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    margin-bottom: 28px;
    font-size: 1.05rem;
  }
  .vcard-footer-nav a{ color: var(--ink); }
  .vcard-footer-nav a:hover{ color: var(--pink); }
  .vcard-footer-linkedin{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--slate);
    margin-bottom: 28px;
  }
  .vcard-footer-linkedin svg{ width: 20px; height: 20px; }
  .vcard-footer .legal{
    font-size: 0.78rem;
    color: var(--slate);
    border-top: 1px solid var(--surface-border);
    padding-top: 24px;
  }
  
  @media (max-width: 480px){
    .vcard-avatar{ width: 150px; height: 150px; }
    .vcard-name{ font-size: 1.6rem; }
  }
  
    /* 404 page
     ============================================ */
  .error-page{
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-image:
      linear-gradient(var(--surface-border) 1px, transparent 1px),
      linear-gradient(90deg, var(--surface-border) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 40%, transparent 100%);
    mask-image: radial-gradient(70% 70% at 50% 40%, #000 40%, transparent 100%);
  }
  .error-inner{
    position: relative;
    padding: 90px 24px 110px;
    max-width: 720px;
  }
  .error-title{
    font-size: clamp(2.4rem, 6vw, 4rem);
    margin-bottom: 20px;
  }
  .error-lead{
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: 36px;
  }