/* ═══════════════════════════════════════════════════════════════
   MICHELE GOVONI — Stile editoriale caldo
   Palette: pergamena, inchiostro, oro antico, terracotta
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Jost:wght@300;400;500;600&display=swap');

/* ── Variabili ── */
:root {
  --pergamena:   #F5F0E8;
  --pergamena2:  #EDE7D9;
  --carta:       #FAF7F2;
  --inchiostro:  #1C1A17;
  --inchiostro2: #2E2B26;
  --oro:         #9A7B2F;
  --oro-light:   #C8A44A;
  --oro-pale:    #F0E6C8;
  --terracotta:  #8B4A2F;
  --grigio:      #7A7568;
  --grigio-light:#B8B2A6;
  --bianco:      #FDFBF8;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Libre Baskerville', Georgia, serif;
  --font-ui:      'Jost', sans-serif;

  --max-w: 980px;
  --nav-h: 72px;
}

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

body {
  background: var(--carta);
  color: var(--inchiostro);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--oro); text-decoration: none; transition: color .2s; }
a:hover { color: var(--terracotta); }

/* ── Texture di sfondo ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Navigazione ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(245, 240, 232, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(154, 123, 47, 0.2);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--inchiostro);
  letter-spacing: .04em;
  line-height: 1;
}

.nav-brand span {
  display: block;
  font-size: .7rem;
  font-family: var(--font-ui);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--oro);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--inchiostro2);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--oro);
  border-bottom-color: var(--oro);
}

/* Hamburger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--inchiostro);
  transition: transform .3s;
}

/* ── Layout principale ── */
main {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-h);
}

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

/* ── Hero ── */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro-light), transparent);
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 40px;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--oro);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--inchiostro);
  margin-bottom: 28px;
  letter-spacing: -.01em;
}

.hero-title em {
  font-style: italic;
  color: var(--oro);
}

.hero-subtitle {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 300;
  color: var(--grigio);
  letter-spacing: .05em;
  max-width: 540px;
  line-height: 1.7;
}

.hero-rule {
  width: 60px;
  height: 1px;
  background: var(--oro);
  margin: 32px 0;
}

/* ── Titoli di sezione ── */
.section {
  padding: 80px 0;
}

.section-label {
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--oro);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--inchiostro);
  line-height: 1.15;
  margin-bottom: 40px;
}

.section-title em { font-style: italic; color: var(--oro); }

/* ── Divisore ornamentale ── */
.ornament {
  text-align: center;
  color: var(--oro-light);
  font-size: 1.2rem;
  letter-spacing: .4em;
  margin: 60px 0;
  opacity: .6;
}

/* ── Card ── */
.card {
  background: var(--bianco);
  border: 1px solid var(--pergamena2);
  padding: 36px 40px;
  margin-bottom: 24px;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}

.card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--oro);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .25s ease;
}

.card:hover { transform: translateX(4px); box-shadow: -4px 0 0 var(--oro); }
.card:hover::before { transform: scaleY(1); }

.card-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--oro-light);
  line-height: 1;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--inchiostro);
  margin-bottom: 8px;
}

.card-meta {
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 400;
  color: var(--grigio);
  letter-spacing: .08em;
  margin-bottom: 16px;
  font-style: italic;
}

.card p { font-size: .95rem; color: var(--inchiostro2); margin-bottom: 12px; }

.card-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--oro);
  border: 1px solid var(--oro-light);
  padding: 3px 10px;
  margin-top: 8px;
  margin-right: 6px;
}

/* ── Citazione ── */
blockquote {
  border-left: 3px solid var(--oro);
  margin: 48px 0;
  padding: 28px 36px;
  background: var(--oro-pale);
  position: relative;
}

blockquote::before {
  content: '\201C';
  position: absolute;
  top: -10px; left: 24px;
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--oro-light);
  line-height: 1;
  opacity: .5;
}

blockquote p {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 400;
  color: var(--inchiostro);
  line-height: 1.6;
  margin-bottom: 12px;
}

blockquote cite {
  font-family: var(--font-ui);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--oro);
  font-style: normal;
}

/* ── Timeline ── */
.timeline { position: relative; padding-left: 32px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--oro), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--pergamena2);
}

.timeline-item:last-child { border-bottom: none; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px; top: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--oro);
  border: 2px solid var(--carta);
  box-shadow: 0 0 0 1px var(--oro);
}

.timeline-year {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--oro);
  margin-bottom: 4px;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--inchiostro);
  margin-bottom: 4px;
}

.timeline-place {
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--grigio);
  font-style: italic;
}

/* ── Griglia 2 colonne ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

/* ── Info box ── */
.info-strip {
  background: var(--inchiostro);
  color: var(--pergamena);
  padding: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 60px 0;
}

.info-strip-item { text-align: center; }

.info-strip-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--oro-light);
  line-height: 1;
  margin-bottom: 6px;
}

.info-strip-label {
  font-family: var(--font-ui);
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--grigio-light);
}

/* ── Competenze chip ── */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.chip {
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--inchiostro2);
  background: var(--pergamena);
  border: 1px solid var(--pergamena2);
  padding: 6px 16px;
  transition: background .2s, color .2s;
}

.chip:hover {
  background: var(--oro);
  color: var(--bianco);
  border-color: var(--oro);
}

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  background: var(--inchiostro2);
  color: var(--grigio-light);
  padding: 48px 40px;
  text-align: center;
}

footer .footer-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--pergamena);
  letter-spacing: .06em;
  margin-bottom: 12px;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  list-style: none;
  margin-bottom: 28px;
}

footer .footer-links a {
  font-family: var(--font-ui);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--grigio-light);
  transition: color .2s;
}

footer .footer-links a:hover { color: var(--oro-light); }

footer .footer-copy {
  font-family: var(--font-ui);
  font-size: .75rem;
  color: var(--grigio);
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  margin-top: 8px;
}

/* ── Separatore di sezione ── */
.section-sep {
  border: none;
  border-top: 1px solid var(--pergamena2);
  margin: 60px 0;
}

/* ── Accordion ── */
details {
  border-bottom: 1px solid var(--pergamena2);
  margin-bottom: 0;
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--inchiostro);
  transition: color .2s;
}

summary:hover { color: var(--oro); }

summary::after {
  content: '+';
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--oro);
  transition: transform .2s;
  flex-shrink: 0;
}

details[open] summary::after { transform: rotate(45deg); }
details[open] summary { color: var(--oro); }

.details-body {
  padding: 0 0 28px 0;
  font-size: .95rem;
  color: var(--inchiostro2);
  line-height: 1.8;
}

.details-body ul {
  padding-left: 20px;
  margin: 12px 0;
}

.details-body li { margin-bottom: 6px; }

.details-body .result-label {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--oro);
  margin-top: 16px;
  margin-bottom: 4px;
}

/* ── Pagina interna: hero compatto ── */
.page-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--pergamena2);
  margin-bottom: 64px;
}

/* ── Animazioni ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp .7s ease both;
}

.fade-up-1 { animation-delay: .1s; }
.fade-up-2 { animation-delay: .22s; }
.fade-up-3 { animation-delay: .36s; }
.fade-up-4 { animation-delay: .5s; }

/* ── Responsive ── */
@media (max-width: 768px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--pergamena); padding: 24px; border-bottom: 1px solid var(--pergamena2); gap: 20px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .container, .hero-inner { padding: 0 24px; }
  .hero { min-height: 55vh; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .info-strip { grid-template-columns: 1fr; padding: 32px 24px; }
  footer { padding: 40px 24px; }
  footer .footer-links { flex-wrap: wrap; gap: 16px; }
  .section { padding: 56px 0; }
  blockquote { padding: 20px 24px; }
  .card { padding: 24px; }
}
