/* ─────────────────────────────────────────────
   STUDIO MAGISTRO — Consulenza del Lavoro
   style.css
───────────────────────────────────────────── */

:root {
  --gold: #F5C518;
  --gold-dark: #D4A017;
  --black: #0D0D0D;
  --dark: #1A1A1A;
  --mid: #2E2E2E;
  --gray: #6B6B6B;
  --light-gray: #F0EFED;
  --white: #FAFAF8;
  --accent: #C9A227;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
}

/* ── NAVBAR ─────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 4rem;
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 197, 24, 0.18);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo img {
  height: 46px;
  width: auto;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-brand span:first-child {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--black);
}

.nav-brand span:last-child {
  font-size: .7rem;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gray);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--mid);
  font-size: .82rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
  transition: color .3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--gold);
  transition: right .3s;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  right: 0;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn svg {
  width: 28px;
  height: 28px;
  fill: var(--black);
}

/* ── HERO ────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.hero-left {
  background: var(--black);
  padding: 10rem 4rem 6rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  animation: fadeInLeft .9s ease both;
}

.hero-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(245, 197, 24, .08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(245, 197, 24, .04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s .2s ease both;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 4vw, 4.4rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--white);
  margin-bottom: .4rem;
  animation: fadeInUp 1s .3s ease both;
}

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

.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.2rem, 1.8vw, 1.65rem);
  font-weight: 300;
  color: rgba(250, 250, 248, .5);
  margin-bottom: 2.5rem;
  letter-spacing: .04em;
  animation: fadeInUp 1s .4s ease both;
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 2rem;
  animation: expandWidth .9s .5s ease both;
}

.hero-desc {
  font-size: .95rem;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(250, 250, 248, .62);
  max-width: 390px;
  animation: fadeInUp 1s .6s ease both;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  animation: fadeInUp 1s .7s ease both;
}

.btn-primary {
  background: var(--gold);
  color: var(--black);
  padding: .88rem 2rem;
  border-radius: 2px;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  transition: background .3s, transform .2s;
}

.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid rgba(250, 250, 248, .22);
  color: var(--white);
  padding: .88rem 2rem;
  border-radius: 2px;
  font-size: .82rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  transition: border-color .3s, background .3s;
}

.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(245, 197, 24, .05);
}

/* Hero right — card contatti */
.hero-right {
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 4rem;
  position: relative;
  animation: fadeInRight .9s ease both;
}

.hero-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--light-gray) 0%, #E8E6E1 100%);
}

.hero-card {
  position: relative;
  z-index: 1;
  background: white;
  border-radius: 4px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .04);
  max-width: 390px;
  width: 100%;
  border-top: 3px solid var(--gold);
}

.hero-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 600;
  margin-bottom: .3rem;
  color: var(--black);
}

.hero-card-sub {
  font-size: .78rem;
  color: var(--gray);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E5E5E3;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.contact-item:hover .contact-icon {
  background: var(--gold);
}

.contact-icon {
  width: 36px;
  height: 36px;
  background: var(--black);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.contact-icon svg {
  width: 16px;
  height: 16px;
  fill: var(--gold);
  transition: fill 0.3s ease;
}

.contact-item:hover .contact-icon svg {
  fill: var(--black);
}

.contact-label {
  font-size: .7rem;
  color: var(--gray);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .2rem;
}

.contact-value {
  font-size: .88rem;
  color: var(--black);
  font-weight: 400;
}

.contact-value a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}

.contact-value a:hover {
  color: var(--gold-dark);
}

/* ── SEZIONI BASE ────────────────────────────── */
section {
  padding: 7rem 4rem;
}

.section-eyebrow {
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--black);
}

.section-lead {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--gray);
  max-width: 600px;
}

/* ── SERVIZI ─────────────────────────────────── */
#servizi {
  background: var(--black);
  color: var(--white);
}

#servizi .section-title {
  color: var(--white);
}

#servizi .section-lead {
  color: rgba(250, 250, 248, .52);
}

.servizi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5px;
  margin-top: 4rem;
  background: rgba(255, 255, 255, .06);
}

.servizio-item {
  background: var(--black);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: background .3s;
}

.servizio-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .4s ease;
}

.servizio-item:hover {
  background: #141414;
}

.servizio-item:hover::before {
  width: 100%;
}

.servizio-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1;
  color: rgba(245, 197, 24, .12);
  position: absolute;
  top: 1.5rem;
  right: 1.8rem;
  pointer-events: none;
  transition: color .3s;
}

.servizio-item:hover .servizio-num {
  color: rgba(245, 197, 24, .22);
}

.servizio-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1.5rem;
  color: var(--gold);
}

.servizio-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: .8rem;
  line-height: 1.4;
}

.servizio-desc {
  font-size: .83rem;
  font-weight: 300;
  color: rgba(250, 250, 248, .48);
  line-height: 1.75;
  text-align: justify;
}

/* ── ABOUT ───────────────────────────────────── */
#about {
  background: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
}

.about-left {
  padding: 7rem 5rem 7rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-right {
  background: var(--light-gray);
  padding: 7rem 4rem 7rem 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-right::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(245, 197, 24, .2);
  border-radius: 50%;
  pointer-events: none;
}

.about-right::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -30px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(245, 197, 24, .12);
  border-radius: 50%;
  pointer-events: none;
}

.value-list {
  list-style: none;
}

.value-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, .07);
}

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

.value-check {
  width: 22px;
  height: 22px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.value-check svg {
  width: 10px;
  height: 10px;
  stroke: var(--black);
  stroke-width: 3;
  fill: none;
}

.value-text strong {
  display: block;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: .25rem;
}

.value-text p {
  font-size: .82rem;
  color: var(--gray);
  line-height: 1.7;
  font-weight: 300;
}

/* ── STATS ───────────────────────────────────── */
#stats {
  background: var(--gold);
  padding: 5rem 4rem;
  display: flex;
  justify-content: center;
}

.stat-item {
  text-align: center;
  padding: 0 5rem;
  border-right: 1px solid rgba(0, 0, 0, .12);
}

.stat-item:last-child {
  border-right: none;
}

.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-weight: 300;
  line-height: 1;
  color: var(--black);
  margin-bottom: .5rem;
}

.stat-label {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, .55);
  font-weight: 400;
}

/* ── CONTATTI ────────────────────────────────── */
#contatti {
  background: var(--black);
  color: var(--white);
}

#contatti .section-title {
  color: var(--white);
}

#contatti .section-lead {
  color: rgba(250, 250, 248, .5);
}

.contatti-info {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  margin-top: 4rem;
  max-width: 480px;
}

.contatti-info-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.ci-icon {
  width: 50px;
  height: 50px;
  background: rgba(245, 197, 24, .1);
  border: 1px solid rgba(245, 197, 24, .22);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ci-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--gold);
}

.ci-label {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .4rem;
  display: block;
}

.ci-value {
  font-size: 1rem;
  color: var(--white);
  font-weight: 300;
  line-height: 1.65;
}

.ci-value a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}

.ci-value a:hover {
  color: var(--gold);
}

.contatti-note {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid rgba(245, 197, 24, .2);
  border-radius: 2px;
  max-width: 480px;
}

.contatti-note p {
  font-size: .88rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(250, 250, 248, .55);
}

.contatti-note a {
  color: var(--gold);
  text-decoration: none;
}

.contatti-note a:hover {
  color: var(--gold-dark);
}

/* ── FOOTER ──────────────────────────────────── */
footer {
  background: #0A0A0A;
  padding: 3rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .05);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.footer-logo {
  height: 38px;
  width: auto;
  opacity: .75;
}

.footer-copy {
  font-size: .78rem;
  color: rgba(255, 255, 255, .28);
  font-weight: 300;
}

.footer-copy strong {
  color: rgba(255, 255, 255, .55);
  font-weight: 400;
}

.footer-right {
  font-size: .75rem;
  color: rgba(255, 255, 255, .22);
  text-align: right;
  line-height: 1.85;
}

/* ── ANIMAZIONI ──────────────────────────────── */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes expandWidth {
  from {
    width: 0;
  }

  to {
    width: 60px;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 960px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(250, 250, 248, 0.98);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(245, 197, 24, 0.18);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  #hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-left {
    padding: 8rem 1.5rem 4rem;
    justify-content: flex-start;
  }

  .hero-right {
    display: flex;
    padding: 2rem 1.5rem 4rem;
  }

  .hero-card {
    padding: 2.5rem 1.5rem;
    max-width: 100%;
  }

  section {
    padding: 4rem 1.5rem;
  }

  #about {
    grid-template-columns: 1fr;
  }

  .about-left,
  .about-right {
    padding: 4rem 1.5rem;
  }

  #stats {
    flex-direction: column;
    gap: 0;
    padding: 4rem 1.5rem;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, .12);
    padding: 2.5rem 1rem;
  }

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

  footer {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    padding: 3rem 1.5rem;
  }

  .footer-left {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-right {
    text-align: center;
  }
}