/* ============================================================
   MARCOLINI AVVOCATI ASSOCIATI — Stile principale
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:   #1c2b4a;
  --navy2:  #162038;
  --gold:   #b8963e;
  --gold2:  #d4af5a;
  --white:  #ffffff;
  --cream:  #f7f6f2;
  --text:   #2c2c2c;
  --muted:  #666666;
  --radius: 2px;
}

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

body {
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

/* -------- TYPOGRAPHY -------- */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); letter-spacing: 0.12em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: 0.04em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.7rem); }

p {
  font-size: 1rem;
  line-height: 1.8;
  color: inherit;
  margin-bottom: 1rem;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--gold2); }

ul { list-style: none; }

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -------- UTILITIES -------- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 7rem 0;
}

.section-light { background: var(--cream); color: var(--text); }
.section-dark  { background: var(--navy); color: var(--white); }
.section-navy  { background: var(--navy2); color: var(--white); }

.section-label {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}
.section-label.light { color: var(--gold2); }

.gold-line {
  width: 3.5rem;
  height: 2px;
  background: var(--gold);
  margin: 1.2rem 0 2rem;
}
.gold-line.short {
  width: 2rem;
  margin: 0.8rem 0 1rem;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.4rem 0;
  transition: background 0.35s, padding 0.35s, box-shadow 0.35s;
}

#navbar.scrolled {
  background: var(--navy2);
  padding: 0.9rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.35);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}
.logo-main {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--white);
}
.logo-sub {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 3px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.25s, opacity 0.25s;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
}
.hero-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(12,18,35,0.55) 0%,
    rgba(12,18,35,0.45) 60%,
    rgba(12,18,35,0.75) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 1.5rem;
}
.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold2);
  margin-bottom: 1.2rem;
}
.hero-content h1 {
  color: var(--white);
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  margin-bottom: 1.4rem;
}
.hero-sub {
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  animation: bounce 2s infinite;
}
.scroll-arrow {
  display: block;
  width: 14px;
  height: 14px;
  border-right: 2px solid rgba(255,255,255,0.6);
  border-bottom: 2px solid rgba(255,255,255,0.6);
  transform: rotate(45deg);
  margin-top: -6px;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   LO STUDIO
   ============================================================ */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.studio-text h2 { color: var(--navy); }
.studio-text p   { color: var(--muted); }
.studio-image {
  height: 480px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(28,43,74,0.18);
}

/* ============================================================
   AREE DI COMPETENZA
   ============================================================ */
#competenze h2 { color: var(--white); }

.competenze-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 1rem;
}

.competenza-block h3 {
  color: var(--gold2);
  margin-bottom: 1.5rem;
  font-size: 1.55rem;
}
.competenza-icon {
  color: var(--gold);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.competenza-block ul li {
  border-left: 2px solid var(--gold);
  padding: 0.5rem 0 0.5rem 1.2rem;
  margin-bottom: 1.4rem;
}
.competenza-block ul li strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.competenza-block ul li p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0;
  line-height: 1.65;
}

.competenza-image-wrap {
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius);
  margin-top: 2rem;
  opacity: 0.75;
}

/* ============================================================
   I PROFESSIONISTI
   ============================================================ */
#professionisti h2 { color: var(--navy); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 1rem;
}

.team-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(28,43,74,0.10);
  transition: transform 0.3s, box-shadow 0.3s;
}
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(28,43,74,0.18);
}

.team-photo-wrap {
  height: 280px;
  overflow: hidden;
  background: var(--navy);
}
.team-photo-wrap img {
  transition: transform 0.5s;
  object-position: top center;
}
.team-card:hover .team-photo-wrap img {
  transform: scale(1.04);
}

.team-info {
  padding: 1.8rem;
}
.team-info h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.team-role {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.team-info p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}
.team-contact {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(28,43,74,0.1);
  font-size: 0.8rem;
}
.team-contact a {
  color: var(--navy);
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
  word-break: break-all;
}
.team-contact a:hover {
  opacity: 1;
  color: var(--gold);
}

/* ============================================================
   DOVE SIAMO
   ============================================================ */
#contatti h2 { color: var(--white); }

.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 1rem;
}

.contatti-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contatto-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}
.contatto-icon {
  color: var(--gold);
  font-size: 0.5rem;
  margin-top: 0.35rem;
  flex-shrink: 0;
}
.contatto-item strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold2);
  margin-bottom: 0.4rem;
}
.contatto-item p {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0;
}
.contatto-item a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  display: block;
  line-height: 1.8;
}
.contatto-item a:hover { color: var(--gold2); }

.contatti-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  height: 320px;
}
.contatti-gallery img {
  border-radius: var(--radius);
  object-fit: cover;
  height: 100%;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #0d1526;
  padding: 1.8rem 0;
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.65);
}
.footer-copy {
  letter-spacing: 0.04em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .studio-grid,
  .competenze-grid,
  .contatti-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .studio-image { height: 300px; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .contatti-gallery { height: 220px; }
}

@media (max-width: 640px) {
  .section { padding: 5rem 0; }
  .team-grid { grid-template-columns: 1fr; }
  .contatti-gallery { grid-template-columns: 1fr; height: auto; }
  .contatti-gallery img { height: 200px; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--navy2);
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-container { position: relative; }
}

/* ============================================================
   ANIMAZIONI DI INGRESSO (Intersection Observer)
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
