/* === RESET & BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #fafafa;
  --bg-section-alt: #f4f4f5;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #a855f7;
  --accent-hover: #9333ea;
  --accent-light: #f3e8ff;
  --radius: 14px;
  --nav-h: 64px;
  --max-w: 1080px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

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

/* === HEADER / NAV === */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.btn-nav {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  transition:
    background 0.2s,
    color 0.2s;
}

.btn-nav:hover {
  background: var(--accent);
  color: #fff;
}

/* === HERO === */
#hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 5rem;
  position: relative;
}

.hero-content {
  max-width: 680px;
}

.hero-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

#hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2.25rem;
  line-height: 1.55;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.85rem 2.2rem;
  border-radius: 999px;
  transition:
    background 0.2s,
    transform 0.15s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero-scroll-hint span {
  display: block;
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0% {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
  }
  40% {
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
  }
  80% {
    opacity: 0;
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    opacity: 0;
  }
}

/* === SEZIONI === */
section {
  padding: 5rem 1.5rem;
}

section:nth-of-type(even) {
  background: var(--bg-section-alt);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

section h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.75rem;
  line-height: 1.15;
}

section h2::after {
  content: ".";
  color: var(--accent);
}

/* === CHI SONO === */
.chi-sono-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.chi-sono-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.chi-sono-text p:last-of-type {
  margin-bottom: 1.5rem;
}

.chi-sono-disponibile {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text) !important;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.08);
  }
}

.fotoRomano {
  max-width: 280px;
  margin: 0 auto;
  border-radius: var(--radius);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--accent);
  background: var(--accent-light);
  font-size: 0.88rem;
  font-weight: 500;
}

/* === COSA FACCIO === */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.1);
  transform: translateY(-3px);
}

.card-icon {
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* === CONTATTI === */
#contatti {
  text-align: center;
}

.contact-intro {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.6rem;
  width: 100%;
  max-width: 360px;
  transition:
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}

.contact-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.1);
  transform: translateY(-2px);
}

.contact-icon {
  display: flex;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* === ANIMAZIONI SCROLL === */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === CAROSELLO === */
.carousel-btn {
  display: none;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition:
    background 0.2s,
    transform 0.2s;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.25);
}

/* === RESPONSIVE === */
@media (min-width: 640px) {
  .contact-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .chi-sono-grid {
    grid-template-columns: 1fr 280px;
    gap: 4rem;
  }

  .photo-placeholder {
    margin: 0;
  }

  .carousel-dots,
  .carousel-btn {
    display: none;
  }
}

@media (max-width: 767px) {
  /* Chi Sono — centra testi */
  .chi-sono-text {
    text-align: center;
  }

  .chi-sono-disponibile {
    justify-content: center;
  }

  /* Cosa Faccio — carosello */
  .carousel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .carousel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    cursor: pointer;
    transition:
      border-color 0.2s,
      color 0.2s,
      opacity 0.2s;
  }

  .carousel-btn:not(:disabled):hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .carousel-btn:disabled {
    opacity: 0.3;
    cursor: default;
  }

  .carousel-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    touch-action: pan-y;
  }

  .cards {
    display: flex;
    gap: 0;
    margin-top: 0;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .card {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 1.5rem 1.25rem;
  }

  /* Le card nel carosello non usano reveal — già visibili */
  .cards .card.reveal {
    opacity: 1;
    transform: none;
    transition:
      border-color 0.2s,
      box-shadow 0.2s;
  }
}
