/* =============================================
   DESIGN SYSTEM – Dott. Fabio Bisicchia
   Palette: biglietto da visita originale
   ============================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Sfondo */
  --bg-top:        #fdfbf0;
  --bg-bottom:     #fcf9e3;

  /* Onde organiche */
  --wave-mid:      #b6dfaa;
  --wave-low:      #8fae73;

  /* Testi principali */
  --color-name:    #2b4360;   /* Blu ardesia / Indaco profondo */
  --color-qual:    #e36b28;   /* Terracotta / Arancio caldo */
  --color-text:    #2b4360;
  --color-muted:   #5a7090;

  /* I 4 Elementi */
  --aria:          #3e5c7a;
  --terra:         #82b260;
  --fuoco:         #c36e3b;
  --acqua:         #978e58;
  --etere:         #494326;

  /* Spacing */
  --sp-xs:   0.5rem;
  --sp-sm:   1rem;
  --sp-md:   2rem;
  --sp-lg:   3.5rem;
  --sp-xl:   6rem;

  /* Border radius */
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   28px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-card:   0 8px 40px rgba(43,67,96,0.10);
  --shadow-hover:  0 16px 56px rgba(43,67,96,0.18);
  --shadow-btn:    0 4px 18px rgba(43,67,96,0.22);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur:  0.28s;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-top);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--sp-md);
}
.container--narrow { max-width: 820px; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--color-qual);
  outline-offset: 3px;
}
.btn--primary {
  background: var(--color-name);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover {
  background: #1e3352;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.btn--secondary {
  background: var(--color-qual);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn--secondary:hover {
  background: #c45a1a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.btn--ghost {
  background: transparent;
  color: var(--color-name);
  border-color: var(--color-name);
}
.btn--ghost:hover {
  background: var(--color-name);
  color: #fff;
  transform: translateY(-2px);
}
.btn--full { width: 100%; justify-content: center; }

/* =============================================
   HERO / BIGLIETTO DA VISITA
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--sp-xl);
  padding-bottom: 140px; /* spazio onde */
}

/* Background pattern sottile */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(62,92,122,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(130,178,96,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: var(--sp-md);
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--sp-md);
}

/* ---- Testo qualifiche (sinistra) ---- */
.hero__content {
  justify-self: start;
  max-width: 380px;
}

.hero__pretitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--color-qual);
  margin-bottom: 0.1rem;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.6s forwards;
}

.hero__name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--color-name);
  margin-bottom: 0.5rem;
  line-height: 1.1;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.7s forwards;
}

.hero__qualifiche {
  border-left: 3px solid var(--color-qual);
  padding-left: var(--sp-sm);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.35s forwards;
}
.hero__qualifiche li {
  font-size: clamp(1.15rem, 2.3vw, 1.6rem);
  font-weight: 600;
  color: var(--color-qual);
  padding: 0.2rem 0;
}
.hero__qualifiche li:not(:last-child) {
  border-bottom: 1px solid rgba(227,107,40,0.15);
}

.hero__registro {
  font-size: 0.78rem;
  color: var(--color-muted);
  font-style: italic;
  margin-bottom: var(--sp-md);
  letter-spacing: 0.01em;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.5s forwards;
}

.hero__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.65s forwards;
}

/* ---- Ritratto fotografico hero (centro) ---- */
.hero__portrait-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  opacity: 0;
  animation: portraitReveal 1.1s cubic-bezier(.34,1.1,.64,1) 0.2s forwards;
}

@keyframes portraitReveal {
  0%   { opacity: 0; transform: scale(0.88) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.hero__portrait-outer {
  position: relative;
  width: 280px;
  height: 330px;
}

/* Anelli animati attorno al ritratto */
.hero__portrait-ring-1,
.hero__portrait-ring-2 {
  position: absolute;
  inset: -12px;
  border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
  border: 1.5px solid var(--color-qual);
  opacity: 0;
  animation: ringFadeIn 1.4s ease 0.8s forwards;
}
.hero__portrait-ring-2 {
  inset: -24px;
  border-color: var(--aria);
  opacity: 0;
  animation: ringFadeIn 1.4s ease 1.0s forwards, ringSpin 18s linear 2s infinite;
  border-style: dashed;
}
@keyframes ringFadeIn {
  to { opacity: 0.3; }
}
@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

.hero__portrait-img-wrap {
  width: 280px;
  height: 330px;
  border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
  overflow: hidden;
  box-shadow:
    0 24px 64px rgba(43,67,96,0.24),
    0 0 0 4px rgba(255,255,255,0.7),
    0 0 0 6px rgba(74,120,152,0.2);
  position: relative;
  z-index: 1;
}

.hero__portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s var(--ease);
}
.hero__portrait-wrap:hover .hero__portrait-img {
  transform: scale(1.04);
}

/* Caption sotto il ritratto */
.hero__portrait-caption {
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 1.1s forwards;
}

/* ---- Logo (destra) ---- */
.hero__logo {
  justify-self: end;
  position: relative;
  flex-shrink: 0;
  width: clamp(180px, 22vw, 260px);
  opacity: 0;
  animation: fadeIn 1s var(--ease) 0.4s forwards;
}

.logo-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(43,67,96,0.15));
}


/* ---- Onde organiche ---- */
.hero__waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}
.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}
.wave--mid  { height: 90px; }
.wave--low  { height: 70px; }

/* =============================================
   SECTION BASE
   ============================================= */
.section {
  padding-block: var(--sp-xl);
  position: relative;
}

.section__title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--color-name);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section__subtitle {
  font-size: 1.05rem;
  color: var(--color-qual);
  text-align: center;
  font-style: italic;
  margin-bottom: var(--sp-lg);
}

/* =============================================
   SEZIONE FILOSOFIA / 4 ELEMENTI
   ============================================= */
.section--filosofia {
  background: linear-gradient(180deg, var(--bg-bottom) 0%, #f5f8f0 100%);
}

/* Testo filosofia */
.filosofia__text {
  max-width: 740px;
  margin-inline: auto;
  background: #fff;
  border-radius: var(--radius-md);
  padding: var(--sp-md) var(--sp-lg);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--terra);
}
.filosofia__text p {
  font-size: 1rem;
  color: #3a4a5a;
  line-height: 1.75;
  margin-bottom: 1rem;
  text-align: justify;
}
.filosofia__text p:last-child { margin-bottom: 0; }
.filosofia__text strong { color: var(--color-name); }
.filosofia__text em     { color: var(--color-qual); font-style: italic; }

.filosofia__text--visita {
  margin-top: var(--sp-md);
  border-left-color: var(--aria);
}
.filosofia__card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-name);
  margin-bottom: var(--sp-sm);
}

/* =============================================
   SEZIONE SEDI E CONTATTI
   ============================================= */
.section--contatti {
  background: linear-gradient(180deg, #f5f8f0 0%, var(--bg-bottom) 100%);
}

/* Contatti diretti (telefono / email) */
.contatti-diretti {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}
.contatti-diretti__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: #fff;
  color: var(--color-name);
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.contatti-diretti__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: var(--color-qual);
}
.contatti-diretti__item svg { color: var(--color-qual); flex-shrink: 0; }
.contatti-diretti__item--static { cursor: default; }
.contatti-diretti__item--static:hover {
  transform: none;
  box-shadow: var(--shadow-card);
  color: var(--color-name);
}

/* Grid sedi */
.sedi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}

.sede-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.sede-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.sede-card__icon { color: var(--color-qual); }
.sede-card__city {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-name);
}
.sede-card__address {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Form contatto */
.contatto-form-wrap {
  max-width: 680px;
  margin-inline: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-card);
}

.contatto-form__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--color-name);
  margin-bottom: var(--sp-md);
  text-align: center;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: var(--sp-sm);
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-name);
  letter-spacing: 0.01em;
}
.form-group label span { color: var(--color-qual); }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.7rem 1rem;
  border: 1.5px solid #d4dce8;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--bg-top);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  outline: none;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #9eadc0; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-name);
  box-shadow: 0 0 0 3px rgba(43,67,96,0.1);
}

.form-note {
  font-size: 0.75rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.5;
}

.form-error {
  font-size: 0.82rem;
  color: #c0392b;
  text-align: center;
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: rgba(192,57,43,0.07);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(192,57,43,0.2);
}

/* Success state */
.form-success {
  text-align: center;
  padding: var(--sp-lg);
  color: var(--terra);
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
}
.form-success:not([hidden]) { display: flex; }
.form-success p { font-size: 1.05rem; color: var(--color-name); }

/* =============================================
   SEZIONE BIOGRAFIA / CURRICULUM
   ============================================= */
.section--bio {
  background: linear-gradient(180deg, var(--bg-bottom) 0%, var(--bg-top) 100%);
}

/* ── Intro: ritratto + testo ── */
.bio__intro {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp-lg);
  align-items: start;
  margin-bottom: var(--sp-xl);
}

/* ── Bio portrait with real photo ── */
.bio__portrait {
  position: relative;
  width: 180px;
  flex-shrink: 0;
}

.bio__portrait-img {
  width: 180px;
  height: 218px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
  display: block;
  box-shadow:
    0 12px 36px rgba(43,67,96,0.2),
    0 0 0 3px rgba(255,255,255,0.8),
    0 0 0 5px rgba(74,120,152,0.18);
  position: relative;
  z-index: 1;
}

.bio__portrait-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--color-qual);
  opacity: 0.4;
  animation: spin 20s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.bio__intro-text p {
  font-size: 1rem;
  color: #3a4a5a;
  line-height: 1.8;
  margin-bottom: 1rem;
  text-align: justify;
}
.bio__intro-text strong { color: var(--color-name); }
.bio__intro-text em     { color: var(--color-qual); }

/* ── Credentials badges ── */
.bio__credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--sp-sm);
}
.credential {
  background: var(--bg-top);
  border: 1.5px solid rgba(43,67,96,0.15);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-name);
  white-space: nowrap;
}

/* ── Timeline verticale ── */
.bio__timeline {
  position: relative;
  max-width: 800px;
  margin-inline: auto;
  margin-bottom: var(--sp-xl);
  padding-left: 2.5rem;
}

/* Linea verticale continua */
.bio__timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--aria), var(--terra), var(--fuoco), var(--acqua));
  opacity: 0.35;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.2rem;
}
.timeline-item:last-child { margin-bottom: 0; }

/* Pallino colorato */
.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--bg-top);
  box-shadow: 0 0 0 2px currentColor;
  flex-shrink: 0;
  z-index: 1;
}
.timeline-dot--blue  { background: var(--aria);   color: var(--aria); }
.timeline-dot--green { background: var(--terra);  color: var(--terra); }
.timeline-dot--fire  { background: var(--fuoco);  color: var(--fuoco); }
.timeline-dot--olive { background: var(--acqua);  color: var(--acqua); }

.timeline-body { flex: 1; }

.timeline-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-qual);
  background: rgba(227,107,40,0.08);
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-name);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.timeline-desc {
  font-size: 0.93rem;
  color: #4a5568;
  line-height: 1.72;
  text-align: justify;
}
.timeline-desc strong { color: var(--color-name); }
.timeline-desc em     { color: var(--color-qual); font-style: italic; }
.timeline-desc + .timeline-desc { margin-top: 0.6rem; }

/* ── Iscrizioni e Accreditamenti ── */
.bio__registri {
  max-width: 800px;
  margin-inline: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--sp-md) var(--sp-lg);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--terra);
}

.bio__registri-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-name);
  margin-bottom: var(--sp-md);
}

.registri-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
}

.registro-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: var(--sp-sm);
  background: var(--bg-top);
  border-radius: var(--radius-md);
  border: 1px solid rgba(43,67,96,0.1);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.registro-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.registro-card__icon { color: var(--terra); flex-shrink: 0; margin-top: 2px; }

.registro-card__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.registro-card__text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-name);
  line-height: 1.3;
}
.registro-card__text span {
  font-size: 0.82rem;
  color: var(--color-muted);
  line-height: 1.4;
}
.registro-card__text em { color: var(--color-qual); font-style: italic; }

/* =============================================
   SEZIONE RECENSIONI
   ============================================= */
.section--recensioni {
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

.recensioni-carousel {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--sp-md);
}

.recensioni-track {
  display: flex;
  gap: var(--sp-md);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  list-style: none;
  flex: 1;
  padding: 0.5rem 0.25rem 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.recensioni-track::-webkit-scrollbar { display: none; }

.recensioni-arrow {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--color-name);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.recensioni-arrow:hover {
  background: var(--color-name);
  color: #fff;
  transform: scale(1.08);
}

.recensione-card {
  flex: 0 0 300px;
  max-width: 82vw;
  scroll-snap-align: start;
  background: #fff;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--terra);
  padding: var(--sp-md);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.recensione-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.recensione-card__quote { color: var(--terra); opacity: 0.6; flex-shrink: 0; }

/* Ritmo cromatico dei 4 elementi, lo stesso della timeline e delle card filosofia */
.recensione-card:nth-of-type(4n+1) { border-left-color: var(--aria); }
.recensione-card:nth-of-type(4n+1) .recensione-card__quote { color: var(--aria); }
.recensione-card:nth-of-type(4n+2) { border-left-color: var(--terra); }
.recensione-card:nth-of-type(4n+2) .recensione-card__quote { color: var(--terra); }
.recensione-card:nth-of-type(4n+3) { border-left-color: var(--fuoco); }
.recensione-card:nth-of-type(4n+3) .recensione-card__quote { color: var(--fuoco); }
.recensione-card:nth-of-type(4n+4) { border-left-color: var(--acqua); }
.recensione-card:nth-of-type(4n+4) .recensione-card__quote { color: var(--acqua); }

.recensione-card__text {
  font-size: 0.92rem;
  color: #3a4a5a;
  line-height: 1.65;
  text-align: justify;
  flex-grow: 1;
}

.recensione-card__author {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-top: 1px solid rgba(43,67,96,0.1);
  padding-top: var(--sp-sm);
}
.recensione-card__author strong {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--color-name);
}
.recensione-card__author span {
  font-size: 0.78rem;
  color: var(--color-muted);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--color-name);
  color: rgba(255,255,255,0.85);
  padding-block: var(--sp-lg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.footer__name {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}
.footer__tagline {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.25rem;
}

.footer__nav {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.footer__nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: color var(--dur) var(--ease);
}
.footer__nav a:hover { color: #fff; }

.footer__copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--sp-md);
}

.footer__credits {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
  margin-top: 0.4rem;
}
.footer__credits a {
  color: rgba(255,255,255,0.45);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--dur) var(--ease);
}
.footer__credits a:hover { color: rgba(255,255,255,0.75); }

/* =============================================
   LOGO ANIMATIONS – Nuovo logo 12 petali
   ============================================= */

/* Entry wrappers: nascosti di default, centrati su (150,150) */
#entry-top, #entry-right, #entry-bottom, #entry-left {
  transform-origin: 150px 150px;
  opacity: 0;
}

/* Centro nascosto di default */
#logo-center-dot {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}



/* 2 – Sbocciatura dei gruppi petalo */
@keyframes groupBloom {
  0%   { opacity: 0; transform: scale(0); }
  55%  { opacity: 1; transform: scale(1.12); }
  75%  { transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

/* 3 – Centro */
@keyframes centerPop {
  0%   { opacity: 0; transform: scale(0); }
  65%  { opacity: 1; transform: scale(1.28); }
  100% { opacity: 1; transform: scale(1); }
}

/* Scatta quando JS aggiunge .logo-animated */
.logo-animated #entry-top    { animation: groupBloom 0.72s cubic-bezier(.34,1.56,.64,1) 0.85s both; }
.logo-animated #entry-right  { animation: groupBloom 0.72s cubic-bezier(.34,1.56,.64,1) 1.1s  both; }
.logo-animated #entry-bottom { animation: groupBloom 0.72s cubic-bezier(.34,1.56,.64,1) 1.35s both; }
.logo-animated #entry-left   { animation: groupBloom 0.72s cubic-bezier(.34,1.56,.64,1) 1.6s  both; }
.logo-animated #logo-center-dot { animation: centerPop 0.5s cubic-bezier(.34,1.56,.64,1) 1.9s both; }

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

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Intersection Observer reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1000px) {
  /* Hero a 2 colonne: testo + foto, logo centrato sotto */
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-md);
  }
  .hero__logo {
    grid-column: 1 / -1;
    justify-self: center;
    width: clamp(140px, 30vw, 200px);
    order: 3;
    margin-top: var(--sp-sm);
  }
  .hero__content {
    max-width: none;
  }
}

@media (max-width: 700px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: var(--sp-lg);
    gap: var(--sp-md);
  }
  .hero__portrait-wrap { order: -1; } /* foto prima del testo */
  .hero__content { justify-self: center; order: 1; }
  .hero__logo {
    grid-column: auto;
    justify-self: center;
    width: clamp(130px, 42vw, 190px);
    order: 2;
    margin-top: 0;
  }
  .hero__qualifiche { border-left: none; padding-left: 0; text-align: center; }
  .hero__qualifiche li { justify-content: center; }
  .hero__contacts { justify-content: center; }
  .hero__portrait-outer {
    width: 220px;
    height: 260px;
  }
  .hero__portrait-img-wrap {
    width: 220px;
    height: 260px;
  }
  .hero__name { font-size: 2.2rem; }

  /* Bio intro */
  .bio__intro {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .bio__credentials { justify-content: center; }

  /* Registri grid */
  .registri-grid { grid-template-columns: 1fr; }

  /* Recensioni: niente frecce su mobile, si scorre col dito */
  .recensioni-arrow { display: none; }
  .recensioni-carousel { padding-inline: var(--sp-sm); }
}

@media (max-width: 600px) {
  .hero { padding-bottom: 100px; }

  .form-row { grid-template-columns: 1fr; }

  .filosofia__text { padding: var(--sp-md); }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__nav { justify-content: flex-start; }

  /* Timeline: riduzione padding */
  .bio__timeline { padding-left: 1.8rem; }
  .bio__timeline::before { left: 8px; }
  .timeline-dot { left: -1.8rem; }

  /* Registri */
  .bio__registri { padding: var(--sp-md); }
}

@media (max-width: 400px) {
  .hero__contacts { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
