/* =========================================================
   Vittorio Nascimbene — Personal brand
   Design system / foglio di stile condiviso
   ========================================================= */

:root {
  /* Colori */
  --cream: #F6F3EE;
  --cream-2: #EFEAE1;
  --ink: #17161A;
  --ink-soft: #3A3941;
  --muted: #6C6A73;
  --line: #E2DBD0;
  --navy: #10233A;
  --navy-2: #0B1929;
  --accent: #E4572E;      /* corallo caldo */
  --accent-2: #C8431F;
  --gold: #D99A32;
  --white: #FFFFFF;

  /* Tipografia */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Misure */
  --maxw: 1120px;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(16, 35, 58, 0.28);
  --shadow-sm: 0 8px 24px -12px rgba(16, 35, 58, 0.25);
}

/* Reset leggero */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 550; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
p { margin: 0 0 1.1em; }
strong { font-weight: 600; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* Utility */
.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); display: inline-block; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .18s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-light { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-light:hover { background: #fff; color: var(--navy); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* =========================================================
   Header / navigazione
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,243,238,.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }
.brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: .96rem; font-weight: 500; color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-cta { margin-left: .5rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .accent-word { color: var(--accent); font-style: italic; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }
.hero-portrait {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius);
  background: linear-gradient(150deg, var(--navy), var(--navy-2));
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; align-items: flex-end; padding: 26px;
  max-width: 400px; margin-left: auto;
}
.hero-portrait img.photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 8%; z-index: 0;
}
.hero-portrait .initials {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 8rem; color: rgba(255,255,255,.10); font-weight: 600;
}
.hero-portrait .tag {
  position: relative; color: #fff; z-index: 2;
}
.hero-portrait .tag small { display:block; color: var(--gold); font-weight:600; letter-spacing:.12em; text-transform:uppercase; font-size:.72rem; margin-bottom:.3rem;}
.hero-portrait .tag strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.hero-portrait::after {
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background: linear-gradient(to top, rgba(7,18,30,.85), rgba(7,18,30,.12) 42%, transparent 68%);
}

.stats { display: flex; gap: 2.4rem; margin-top: 2.6rem; flex-wrap: wrap; }
.stat .n { font-family: var(--serif); font-size: 2rem; color: var(--ink); line-height: 1; }
.stat .l { font-size: .85rem; color: var(--muted); margin-top: .35rem; }

/* Home hero con immagine di sfondo generata */
.hero-home {
  background:
    linear-gradient(90deg, rgba(246,243,238,.97) 0%, rgba(246,243,238,.9) 42%, rgba(246,243,238,.35) 68%, rgba(246,243,238,0) 100%),
    url("hero.png") center right / cover no-repeat;
}
.hero-home .hero-copy { max-width: 600px; }
.hero-home .hero-photo {
  width: 78px; height: 78px; border-radius: 50%; overflow: hidden;
  border: 3px solid #fff; box-shadow: var(--shadow-sm); margin-bottom: 1.3rem;
  background: linear-gradient(150deg, var(--navy), var(--navy-2));
}
.hero-home .hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; display: block; }
@media (max-width: 640px) {
  .hero-home { background:
    linear-gradient(180deg, rgba(246,243,238,.97), rgba(246,243,238,.8)),
    url("hero.png") center / cover no-repeat; }
}

/* =========================================================
   Sezioni generiche
   ========================================================= */
section { padding: clamp(3.2rem, 8vw, 6rem) 0; }
.section-head { max-width: 640px; margin-bottom: 2.6rem; }
.section-head.center { margin-left: auto; margin-right: auto; }

.bg-dark { background: var(--navy); color: #EAF0F6; }
.bg-dark h1, .bg-dark h2, .bg-dark h3 { color: #fff; }
.bg-dark .eyebrow { color: var(--gold); }
.bg-dark .eyebrow::before { background: var(--gold); }
.bg-dark .muted { color: #9FB2C4; }
.bg-cream2 { background: var(--cream-2); }

/* Card aziende */
.ventures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.venture {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.7rem; display: flex; flex-direction: column; gap: .5rem;
  transition: transform .2s ease, box-shadow .2s ease; position: relative; overflow: hidden;
}
.venture:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.venture .badge {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .7rem; border-radius: 999px; margin-bottom: .6rem;
}
.badge-recruit { background: #FCE7DF; color: var(--accent-2); }
.badge-lead { background: #E1EDF6; color: #1C5A8A; }
.badge-ally { background: #E6F1EA; color: #2C7A4B; }
.venture h3 { margin-bottom: .2em; }
.venture .role { font-size: .82rem; color: var(--muted); margin-bottom: .7rem; }
.venture p { font-size: .96rem; color: var(--ink-soft); flex: 1; }
.venture .go { font-weight: 600; color: var(--accent); font-size: .95rem; margin-top: .5rem; display: inline-flex; gap: .4rem; align-items: center; }

/* Loghi ufficiali delle aziende */
.brand-logo { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; min-height: 66px; padding: 12px 18px; border-radius: 12px; margin-bottom: 1rem; }
.brand-logo img { height: 40px; width: auto; object-fit: contain; display: block; }
.brand-logo.on-dark { background: var(--navy); }
.brand-logo.on-light { background: #fff; border: 1px solid var(--line); }
.section-head .brand-logo { margin-bottom: 1.1rem; }

/* Lista valori / features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.feature { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.5rem; }
.feature .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--cream-2); display:flex; align-items:center; justify-content:center; margin-bottom: 1rem; color: var(--accent); }
.feature h3 { font-size: 1.15rem; }
.feature p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.bg-dark .feature { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
.bg-dark .feature .ico { background: rgba(255,255,255,.08); color: var(--gold); }
.bg-dark .feature p { color: #9FB2C4; }

/* =========================================================
   Blog
   ========================================================= */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.post-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post-cover { aspect-ratio: 16/10; position: relative; }
.cover-1 { background: linear-gradient(135deg, #10233A, #2A4A6B); }
.cover-2 { background: linear-gradient(135deg, #E4572E, #D99A32); }
.cover-3 { background: linear-gradient(135deg, #2C7A4B, #10233A); }
/* Copertine blog: immagini reali sulle card */
.post-cover.cover-1 { background: #EFEAE1 url("blog-recruiting.png") center/cover no-repeat; }
.post-cover.cover-2 { background: #EFEAE1 url("blog-impresa.png") center/cover no-repeat; }
.post-cover.cover-3 { background: #EFEAE1 url("blog-carriera.png") center/cover no-repeat; }
.post-cover .cat { display: none; }
.post-cover .cat {
  position: absolute; left: 16px; bottom: 16px; color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(0,0,0,.28); padding: .3rem .7rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.post-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.post-body .date { font-size: .8rem; color: var(--muted); }
.post-body h3 { font-size: 1.28rem; }
.post-body p { font-size: .95rem; color: var(--ink-soft); flex: 1; margin: 0; }
.post-body .go { color: var(--accent); font-weight: 600; font-size: .92rem; margin-top: .6rem; }

/* Articolo singolo */
.article { padding-top: clamp(2.5rem, 6vw, 4rem); }
.article-hero { max-width: 800px; margin: 0 auto 2.2rem; text-align: center; }
.article-hero .cat { color: var(--accent); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.article-hero h1 { margin: .6rem 0 .5rem; font-size: clamp(2rem, 4.6vw, 3.2rem); }
.article-hero .meta { color: var(--muted); font-size: .92rem; }
.article-cover { max-width: 940px; height: clamp(200px, 34vw, 380px); margin: 0 auto 2.6rem; border-radius: var(--radius); }
.article-body { max-width: 720px; margin: 0 auto; font-size: 1.12rem; }
.article-body h2 { margin-top: 2.2rem; font-size: 1.7rem; }
.article-body h3 { margin-top: 1.8rem; }
.article-body blockquote {
  margin: 1.8rem 0; padding: .4rem 0 .4rem 1.6rem; border-left: 3px solid var(--accent);
  font-family: var(--serif); font-size: 1.4rem; font-style: italic; color: var(--ink); line-height: 1.4;
}
.article-body ul { padding-left: 1.2rem; margin: 0 0 1.2rem; }
.article-body li { margin-bottom: .5rem; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-sign { max-width: 720px; margin: 2.6rem auto 0; padding-top: 1.6rem; border-top: 1px solid var(--line); display:flex; align-items:center; gap: 1rem; }
.avatar { position: relative; overflow: hidden; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(150deg, var(--navy), var(--navy-2)); color:#fff; display:flex; align-items:center; justify-content:center; font-family: var(--serif); font-weight:600; }
.avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 15%; }
.article-sign .who strong { display:block; }
.article-sign .who span { color: var(--muted); font-size: .9rem; }

/* =========================================================
   CTA / contatti
   ========================================================= */
.cta-band { text-align: center; }
.cta-band .btn { margin-top: 1.4rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; align-items: start; }
.contact-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-list .ico { color: var(--accent); flex: none; margin-top: 3px; }
.contact-list a { font-weight: 500; }
.contact-list a:hover { color: var(--accent); }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field textarea {
  font-family: var(--sans); font-size: 1rem; padding: .8rem 1rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); }

/* Social pills */
.socials { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; }
.social-pill {
  display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem;
  border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; font-weight: 500; background: var(--white);
  transition: .2s;
}
.social-pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--navy-2); color: #B9C6D4; padding: 3.4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2.4rem; }
.site-footer .brand { color: #fff; font-size: 1.3rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.4rem; font-size: .82rem; color: #7E90A2; display:flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 360px; }
  .ventures, .features, .posts { grid-template-columns: 1fr; }
  .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; background: var(--cream);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 1rem 24px 1.6rem;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transform: translateY(-140%); transition: transform .3s ease; height: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links li { width: 100%; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .nav-links .nav-cta { margin: .8rem 0 0; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .stats { gap: 1.6rem; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

/* Rivelazione al scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
