/*
Theme Name: Nilo Pacenza
Theme URI: https://nilopacenza.it
Author: Nilo Pacenza
Description: Tema multipagina per il sito vetrina di consulenza di Nilo Pacenza — marketing, direzione creativa, formazione, innovazione. Rete di costellazioni animata sullo sfondo.
Version: 10.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nilo-pacenza
*/

:root {
  --color-bg: #0e0f13;
  --color-bg-raised: #16171d;
  --color-ink: #f4f3ef;
  --color-ink-soft: #9c9ca6;
  --color-magenta: #c6ff00;
  --color-orange: #c6ff00;
  --color-line: rgba(244, 243, 239, 0.14);
  --color-line-strong: rgba(244, 243, 239, 0.34);
  --color-label: #c9c9d1;
  --font-display: 'Bricolage Grotesque', 'Arial Black', sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 16px;
  color: var(--color-ink);
  text-wrap: balance;
}

p { margin: 0 0 16px; color: var(--color-ink-soft); }

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

section { position: relative; }

/* Constellation background (fixed, whole site) */

#constellation-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
}

#page-wrap {
  position: relative;
  z-index: 1;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(14, 15, 19, 0.72);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-pill {
  display: flex;
  gap: 8px;
  background: rgba(244, 243, 239, 0.06);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 6px;
  backdrop-filter: blur(12px);
}

.nav-pill a {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-label);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-pill a.is-current {
  color: var(--color-ink);
  background: rgba(244, 243, 239, 0.1);
}

.nav-pill a:hover { color: var(--color-orange); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: rgba(244, 243, 239, 0.06);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 16px;
  margin: 0 auto;
  background: var(--color-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--color-magenta);
  outline-offset: 2px;
}

.btn-primary { background: var(--color-ink); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-magenta); color: var(--color-bg); }

.btn-ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-line-strong);
}
.btn-ghost:hover { border-color: var(--color-ink); background: rgba(244, 243, 239, 0.06); }

.btn-pill {
  background: transparent;
  border-color: var(--color-line-strong);
  color: var(--color-ink);
  padding: 11px 22px;
  font-size: 0.9rem;
}

.nav-cta:hover { border-color: var(--color-ink); background: rgba(244, 243, 239, 0.08); }

.btn-pill-outline { border-color: var(--color-orange); color: var(--color-orange); }
.btn-pill-outline:hover { background: rgba(198, 255, 0, 0.14); }

.btn-large { padding: 16px 34px; font-size: 1.05rem; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-3px); }
  .btn-primary:hover { box-shadow: 0 14px 30px rgba(198, 255, 0, 0.28); }
  .btn-pill-outline:hover { box-shadow: 0 14px 30px rgba(198, 255, 0, 0.22); }
  .btn-ghost:hover, .btn-pill:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
}

/* Eyebrow */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-orange);
  margin-bottom: 20px;
  font-family: var(--font-display);
}

/* Hero (home) */

.hero { padding: 120px 0 100px; }

.hero-inner { max-width: 860px; position: relative; }

.hero-title {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  margin-bottom: 32px;
  margin-top: 8px;
  max-width: 820px;
}

.hero-lead { font-size: 1.15rem; max-width: 520px; margin-bottom: 36px; color: var(--color-ink-soft); }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Page header (dedicated pages) */

.page-hero { padding: 160px 0 60px; }
.page-hero-inner { max-width: 720px; }

.page-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.page-lead { font-size: 1.1rem; max-width: 560px; }

/* Statement (prose) */

.statement {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.4;
  color: var(--color-ink);
  max-width: 820px;
  margin-bottom: 32px;
  text-wrap: balance;
}

.closing-cta { text-align: center; }
.closing-cta .statement { max-width: 640px; margin-left: auto; margin-right: auto; }

.prose-detail { max-width: 640px; margin-top: 32px; font-size: 1rem; }
.prose-detail.prose-wide { max-width: 760px; }

/* Section titles */

.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.section-title-left { text-align: left; }
.section-subtitle { max-width: 560px; font-size: 1.05rem; margin-bottom: 56px; }
.section-subtitle-left { text-align: left; }

/* Constellation list (shared: home hub links + servizi items) */

.section-block { padding: 60px 0 100px; }
.section-block-bordered { padding: 100px 0; border-top: 1px solid var(--color-line); }

.constellation { list-style: none; margin: 0; padding: 0; max-width: 720px; position: relative; }

.constellation::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--color-line);
}

.constellation-item { display: flex; gap: 28px; padding: 32px 0; border-bottom: 1px solid var(--color-line); }
.constellation-item:first-child { padding-top: 4px; }
.constellation-item:last-child { border-bottom: none; }

.constellation-dot {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-top: 8px;
  box-shadow: 0 0 0 5px var(--color-bg);
  position: relative;
  z-index: 1;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}

.dot-magenta { background: var(--color-magenta); }
.dot-orange { background: var(--color-orange); }

.constellation-content { flex: 1; }
.constellation-content h3 { font-size: 1.3rem; margin-bottom: 10px; }
.constellation-content p { margin: 0; max-width: 520px; }

.constellation-link {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  transition: transform 0.2s ease;
}

.constellation-link:hover { transform: translateX(4px); }

.constellation-link:hover .constellation-content h3 { color: var(--color-orange); }

.constellation-arrow {
  margin-left: auto;
  align-self: center;
  color: var(--color-ink-soft);
  font-size: 1.2rem;
  flex: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.constellation-link:hover .constellation-arrow {
  transform: translateX(4px);
  color: var(--color-orange);
}

@media (hover: hover) and (pointer: fine) {
  .constellation-link:hover .constellation-dot {
    transform: scale(1.6);
    box-shadow: 0 0 0 5px var(--color-bg), 0 0 16px 2px currentColor;
  }
  .constellation-link:hover .dot-magenta { color: var(--color-magenta); }
  .constellation-link:hover .dot-orange { color: var(--color-orange); }
}

/* Metodo */

.metodo-steps { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; max-width: 680px; }
.metodo-steps li { display: flex; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--color-line); }
.metodo-steps li:first-child { padding-top: 0; }
.metodo-steps li:last-child { border-bottom: none; padding-bottom: 0; }

.step-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-orange);
  flex: none;
  width: 48px;
}

.metodo-steps h3 { font-size: 1.1rem; margin-bottom: 6px; }
.metodo-steps p { margin: 0; }

.steps-outro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 680px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--color-line);
}

.steps-outro p { margin: 0; max-width: 380px; }

/* Card grid (Servizi, Chi sono) */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-realta > :last-child:nth-child(odd) { grid-column: 1 / -1; }

.info-card {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: 20px;
  padding: 36px;
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .info-card:hover {
    border-color: rgba(244, 243, 239, 0.32);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  }
}

.info-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(244, 243, 239, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.info-card-icon svg { width: 22px; height: 22px; }
.info-card-icon.icon-magenta { color: var(--color-magenta); }
.info-card-icon.icon-orange { color: var(--color-orange); }

.info-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.info-card > p { margin-bottom: 18px; }

.info-card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }

.info-card-list li {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-ink-soft);
  line-height: 1.5;
}

.info-card-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-orange);
  margin-top: 8px;
  flex: none;
}

.info-card:nth-child(even) .info-card-list li::before { background: var(--color-magenta); }

/* Tag cloud (skill / specialty lists) */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  max-width: 780px;
}

.tag-cloud li {
  padding: 9px 18px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--color-label);
  background: rgba(244, 243, 239, 0.03);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .tag-cloud li:hover {
    border-color: var(--color-orange);
    color: var(--color-ink);
    transform: translateY(-2px);
  }
}

/* Situational bullet list ("Quando posso essere utile") */

.situation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
  max-width: 880px;
}

.situation-list li {
  display: flex;
  gap: 12px;
  break-inside: avoid;
  padding: 12px 0;
  font-size: 1rem;
  color: var(--color-ink);
}

.situation-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-orange);
  margin-top: 9px;
  flex: none;
}

.situation-list li:nth-child(even)::before { background: var(--color-magenta); }

/* Pull quote */

.quote-block {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  line-height: 1.45;
  color: var(--color-ink);
  max-width: 760px;
  margin-top: 32px;
  padding-left: 24px;
  border-left: 2px solid var(--color-orange);
  text-wrap: balance;
}

/* Manifesto grid (Metodo principles) */

.manifesto-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-line);
  border: 1px solid var(--color-line);
  border-radius: 20px;
  overflow: hidden;
}

.manifesto-item {
  background: var(--color-bg);
  padding: 32px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-ink);
  line-height: 1.4;
}

/* Contatti — channel cards */

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.channel-card {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}

.channel-card-primary { border-color: rgba(198, 255, 0, 0.4); }

@media (hover: hover) and (pointer: fine) {
  .channel-card:hover {
    border-color: rgba(244, 243, 239, 0.32);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  }
  .channel-card-primary:hover { box-shadow: 0 16px 40px rgba(198, 255, 0, 0.22); }
}

.channel-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(244, 243, 239, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.channel-card-icon svg { width: 22px; height: 22px; }
.channel-card-icon.icon-magenta { color: var(--color-magenta); }
.channel-card-icon.icon-orange { color: var(--color-orange); }

.channel-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.channel-card p { margin-bottom: 24px; font-size: 0.92rem; flex: 1; }
.channel-card .btn { width: 100%; justify-content: center; }

/* Footer */

.site-footer { padding: 40px 0 32px; border-top: 1px solid var(--color-line); }

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.footer-tagline { margin: 0; font-size: 0.85rem; }

.footer-channels { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-channels a { font-size: 0.9rem; font-weight: 600; color: var(--color-ink); }
.footer-channels a:hover { color: var(--color-orange); }

.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--color-ink-soft); padding-top: 24px; border-top: 1px solid var(--color-line); }
.footer-inner a { font-weight: 600; color: var(--color-ink); }

/* Reveal on scroll */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Responsive */

@media (max-width: 720px) {
  .nav-pill {
    position: absolute;
    top: calc(100% + 8px);
    left: 24px;
    right: 24px;
    flex-direction: column;
    gap: 2px;
    display: none;
    background: var(--color-bg-raised);
    border-radius: 20px;
  }
  .nav-pill a { border-radius: 12px; padding: 12px 16px; text-align: left; }
  .nav-pill.open { display: flex; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 84px 0 72px; }
  .page-hero { padding: 120px 0 48px; }
  .constellation-arrow { display: none; }
  .card-grid, .card-grid-3, .channel-grid { grid-template-columns: 1fr; }
  .steps-outro { flex-direction: column; align-items: flex-start; }
  .situation-list { columns: 1; }
  .manifesto-grid { grid-template-columns: 1fr; }
}

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