/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --white:        #ffffff;
  --off-white:    #f7f6f4;
  --rule:         #e2e0dc;
  --text-main:    #1a1917;
  --text-mid:     #4a4845;
  --text-mute:    #8a8885;
  --accent:       #2c5f8a;
  --accent-mid:   #3a7ab5;
  --accent-pale:  #e8f0f7;
  --accent-dark:  #1e4468;
  --font-serif:   Georgia, 'Times New Roman', serif;
  --font-sans:    'Helvetica Neue', Arial, sans-serif;
  --radius:       2px;
  --shadow:       0 4px 18px rgba(0,0,0,0.08);
  --tr:           0.2s ease;
  --max-w:        1160px;
}

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--text-main);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }


/* ════════════════════════════════════════════════
   NAVBAR
════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-inner {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand — visibile solo su mobile */
.navbar-brand {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--text-main);
  display: none;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0 auto;
}

.navbar-links a {
  font-size: 13px;
  color: var(--text-mid);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color var(--tr), border-color var(--tr);
  white-space: nowrap;
}
.navbar-links a:hover { color: var(--text-main); border-bottom-color: var(--rule); }
.navbar-links a.active { color: var(--text-main); font-weight: 500; border-bottom-color: var(--text-main); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-main);
  transition: var(--tr);
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  position: fixed;
  top: 62px; left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  box-shadow: var(--shadow);
  z-index: 999;
  padding: 8px 0 16px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 13px 28px;
  font-size: 14px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--rule);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--text-main); }
.mobile-nav a.active { font-weight: 500; border-left: 3px solid var(--accent); padding-left: 25px; }


/* ════════════════════════════════════════════════
   LAYOUT HELPERS
════════════════════════════════════════════════ */
.container    { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.section      { padding: 80px 0; }
.section-alt  { background: var(--off-white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-dark { background: var(--text-main); }

.section-label {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-mid);
  margin-bottom: 10px;
}
.section-rule  { width: 36px; height: 2px; background: var(--accent); margin-bottom: 20px; }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 14px;
}
.section-lead {
  font-size: 15px;
  color: var(--text-mid);
  max-width: 640px;
  line-height: 1.85;
  margin-bottom: 48px;
}


/* ════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════ */
.btn {
  display: inline-block;
  padding: 11px 26px;
  font-size: 13px;
  letter-spacing: .04em;
  border-radius: var(--radius);
  transition: background var(--tr), border-color var(--tr), color var(--tr);
  cursor: pointer;
}
.btn-primary  { background: var(--accent); color: var(--white); }
.btn-primary:hover  { background: var(--accent-dark); }
.btn-outline  { background: transparent; color: var(--text-mid); border: 1px solid var(--rule); }
.btn-outline:hover  { border-color: var(--accent-mid); color: var(--accent); }
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color var(--tr);
}
.btn-link:hover { border-color: var(--accent-mid); }


/* ════════════════════════════════════════════════
   HOME — HERO (Blocco 1)
════════════════════════════════════════════════ */
.hero {
  border-bottom: 1px solid var(--rule);
  padding: 72px 0 80px;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 72px;
  align-items: start;
}

.hero-overline {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-mid);
  margin-bottom: 18px;
}
.hero-role {
  font-family: var(--font-serif);
  font-size: clamp(12px, 1.3vw, 15px);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 22px;
}
.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.7vw, 18px);
  font-style: italic;
  color: var(--text-mid);
  line-height: 1.65;
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  margin-bottom: 28px;
}
.hero-bio {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 14px;
}
.hero-bio strong { color: var(--text-main); font-weight: 500; }

.hero-credentials {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cred-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.55;
}
.cred-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}
.btn-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color var(--tr);
}
.btn-linkedin svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-linkedin:hover { border-color: var(--accent-mid); }

/* Foto hero */
.hero-photo { position: relative; }
.hero-photo img {
  width: 100%;
  border-radius: var(--radius);
  filter: grayscale(8%) contrast(1.02);
  display: block;
}
.hero-photo::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px;
  width: 44px; height: 44px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  pointer-events: none;
}
.hero-photo::after {
  content: '';
  position: absolute;
  bottom: -10px; right: -10px;
  width: 44px; height: 44px;
  border-bottom: 2px solid var(--rule);
  border-right: 2px solid var(--rule);
  pointer-events: none;
}


/* ════════════════════════════════════════════════
   HOME — AREE (Blocco 2)
════════════════════════════════════════════════ */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
}

.area-card {
  display: block;
  background: var(--white);
  padding: 0 0 36px;
  text-decoration: none;
  color: inherit;
  transition: background var(--tr);
}
.area-card:hover { background: var(--accent-pale); }

.area-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  margin-bottom: 24px;
}
.area-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(10%);
  transition: transform 0.4s ease, filter 0.3s ease;
}
.area-card:hover .area-card-img img { transform: scale(1.03); filter: grayscale(0%); }

.area-card-body { padding: 0 28px; }

.area-num {
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--accent-mid);
  margin-bottom: 10px;
  font-weight: 500;
}
.area-card h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 12px;
}
.area-card p {
  font-size: 14px;
  color: var(--text-mute);
  line-height: 1.75;
  margin-bottom: 18px;
}
.area-card-link {
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  display: inline-block;
  transition: border-color var(--tr);
}
.area-card:hover .area-card-link { border-color: var(--accent-mid); }


/* ════════════════════════════════════════════════
   HOME — CONTATTI (Blocco 3)
════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: center;
}
.contact-intro p {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 10px;
}
.contact-links { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.contact-link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  color: var(--text-main);
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color var(--tr), background var(--tr), color var(--tr);
}
.contact-link-item:hover { border-color: var(--accent-mid); background: var(--accent-pale); color: var(--accent); }
.contact-link-item svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--accent); }
.contact-photo img { width: 100%; border-radius: var(--radius); filter: grayscale(10%); }


/* ════════════════════════════════════════════════
   PAGINE AREA — HERO INTERNO
════════════════════════════════════════════════ */
.page-hero {
  border-bottom: 1px solid var(--rule);
}

/* Banner immagine full-width */
.page-hero-img {
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16/7;
  max-height: 500px;
}
.page-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  display: block;
  filter: grayscale(8%);
}

/* Blocco testo sotto il banner */
.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 32px 48px;
}

.breadcrumb {
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb a { color: var(--text-mute); transition: color var(--tr); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--rule); }

.page-hero-num {
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--accent-mid);
  margin-bottom: 10px;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 20px;
}
.page-hero-intro {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 14px;
  max-width: 72ch;
}

/* Corpo pagina area */
.page-body { padding: 72px 0; }
.page-body-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 72px;
}
.page-content p {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 18px;
}
.page-content h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  margin-top: 40px;
  margin-bottom: 14px;
  color: var(--text-main);
}
.page-content h2:first-child { margin-top: 0; }

/* Sidebar pagina area */
.page-sidebar {}
.sidebar-box {
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.sidebar-box h4 {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 14px;
  color: var(--text-main);
}
.sidebar-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-box ul li {
  font-size: 13px;
  color: var(--text-mid);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.55;
}
.sidebar-box ul li::before {
  content: '·';
  color: var(--accent);
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.2;
}
.sidebar-nav-title {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 12px;
}
.sidebar-area-links { display: flex; flex-direction: column; gap: 4px; }
.sidebar-area-link {
  display: block;
  font-size: 13px;
  color: var(--text-mute);
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color var(--tr), background var(--tr), color var(--tr);
  line-height: 1.45;
}
.sidebar-area-link:hover { background: var(--accent-pale); border-color: var(--accent-mid); color: var(--accent); }
.sidebar-area-link.current { background: var(--accent-pale); border-color: var(--accent); color: var(--accent); font-weight: 500; }


/* ════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════ */
footer {
  background: var(--text-main);
  color: rgba(255,255,255,.4);
  padding: 52px 0 32px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 22px;
}
.footer-name  { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.82); margin-bottom: 3px; }
.footer-role  { font-size: 11px; color: rgba(255,255,255,.32); line-height: 1.7; margin-bottom: 16px; }
.footer-link  {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(255,255,255,.35);
  margin-bottom: 8px;
  transition: color var(--tr);
}
.footer-link:hover { color: rgba(255,255,255,.75); }
.footer-link svg { width: 13px; height: 13px; flex-shrink: 0; }
.footer-col-title { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.22); margin-bottom: 12px; }
.footer-nav { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { font-size: 12px; color: rgba(255,255,255,.35); transition: color var(--tr); }
.footer-nav a:hover { color: rgba(255,255,255,.75); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.5); transition: color var(--tr); }
.footer-bottom a:hover { color: rgba(255,255,255,.85); }


/* ════════════════════════════════════════════════
   SCROLL TO TOP
════════════════════════════════════════════════ */
#scrollTop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px; height: 42px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 900;
  transition: background var(--tr), border-color var(--tr);
}
#scrollTop:hover { background: var(--accent-pale); border-color: var(--accent-mid); }
#scrollTop svg { stroke: var(--text-mid); transition: stroke var(--tr); }
#scrollTop:hover svg { stroke: var(--accent); }


/* ════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .navbar-links { display: none; }
  .hamburger    { display: flex; }
  .navbar-brand { display: block; }

  .hero-inner            { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo            { max-width: 260px; order: -1; }
  .hero-photo::before,
  .hero-photo::after     { display: none; }

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

  .contact-grid          { grid-template-columns: 1fr; gap: 36px; }
  .contact-photo         { display: none; }

  .page-hero-img         { max-height: 260px; }
  .page-hero-inner       { padding: 28px 32px 40px; }

  .page-body-inner       { grid-template-columns: 1fr; gap: 40px; }

  .footer-inner          { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .section   { padding: 52px 0; }
  .hero      { padding: 44px 0 52px; }
  .hero-inner { padding: 0 18px; }
  .page-hero-inner { padding: 0 18px; }
  .page-body-inner { padding: 0 18px; }
  .footer-inner    { padding: 0 18px; }
  .footer-bottom   { padding: 0 18px; }
}
