/* ========== VARIABILI ========== */
:root {
  --navy: #14273a;
  --navy-2: #1c3349;
  --navy-3: #24405a;
  --gold: #f2a63b;
  --gold-dark: #d98e22;
  --gold-soft: #fdf3e3;
  --text: #263544;
  --muted: #6b7a89;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --border: #e3e8ee;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 39, 58, 0.08);
  --shadow-strong: 0 20px 50px rgba(20, 39, 58, 0.18);
}

/* ========== BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  color: var(--navy);
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

p {
  margin-bottom: 14px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 12px;
}

.accent {
  color: var(--gold);
}

.center {
  text-align: center;
  margin-top: 40px;
}

/* ========== BOTTONI ========== */
.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 15px 28px;
  border-radius: 50px;
  border: 2px solid var(--gold);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 22px rgba(242, 166, 59, 0.35);
}

.btn:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(20, 39, 58, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
}

.logo-sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}

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

.nav .btn-small {
  color: var(--navy);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle span {
  width: 26px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========== HERO ========== */
.hero {
  padding: 150px 0 90px;
  background:
    radial-gradient(circle at 85% 25%, var(--gold-soft) 0%, transparent 45%),
    radial-gradient(circle at 5% 90%, #eaf0f6 0%, transparent 40%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-sub {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 520px;
  margin: 22px 0 30px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 18px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

.hero-photo {
  position: relative;
  display: flex;
  justify-content: center;
}

.photo-ring {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, var(--gold), var(--navy-3));
  box-shadow: var(--shadow-strong);
}

.photo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 50%;
  border: 6px solid #fff;
}

.badge {
  position: absolute;
  background: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  max-width: 200px;
  animation: float 4s ease-in-out infinite;
}

.badge strong {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold-dark);
  line-height: 1.1;
}

.badge span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
}

.badge-1 {
  top: 10%;
  left: -10px;
}

.badge-2 {
  bottom: 10%;
  right: -10px;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ========== NUMERI ========== */
.stats {
  background: var(--navy);
  padding: 50px 0;
}

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

.stat {
  text-align: center;
  padding: 0 10px;
}

.stat-num {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--gold);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ========== SEZIONI ========== */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
}

.section-head {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 50px;
}

.section-head p:not(.eyebrow) {
  color: var(--muted);
}

/* ========== IMMOBILI VENDUTI ========== */
.sold-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.sold-card {
  position: relative;
  border: none;
  padding: 0;
  background: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 1179 / 1830;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sold-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

/* Ritaglio: parte sotto il logo e finisce prima della barra di Instagram */
.sold-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 57.9%;
}

/* Foto top: scheda doppia, ritaglio dedicato */
.sold-top {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.sold-top img {
  object-position: 50% 34.4%;
}

/* ========== SERVIZI ========== */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.card-icon {
  font-size: 1.8rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-soft);
  border-radius: 14px;
  margin-bottom: 18px;
}

.card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

/* ========== COME LAVORO ========== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.step {
  text-align: center;
  padding: 10px;
}

.step-num {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 8px var(--gold-soft);
}

.step p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

/* ========== CHI SONO ========== */
.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 22px;
  border: 4px solid var(--gold);
  box-shadow: var(--shadow-strong);
}

.about-text h2 {
  color: #fff;
}

.about-text p {
  color: rgba(255, 255, 255, 0.78);
}

.about-role {
  font-weight: 600;
  color: var(--gold) !important;
  margin-top: -8px;
}

.about-list {
  list-style: none;
  margin: 22px 0 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-list li {
  font-weight: 500;
  color: #fff;
}

/* ========== VALUTAZIONE ========== */
.valuation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.valuation-text p:not(.eyebrow) {
  color: var(--muted);
}

.valuation-list {
  list-style: none;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.valuation-list li {
  font-weight: 500;
  color: var(--navy);
}

.form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px;
  box-shadow: var(--shadow-strong);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.form input,
.form select,
.form textarea {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}

.form textarea {
  resize: vertical;
}

/* ========== CONTATTI ========== */
.contacts {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: center;
}

.contact-line {
  font-size: 1.02rem;
  margin-bottom: 16px;
}

.contact-line a {
  color: var(--navy);
  font-weight: 500;
  border-bottom: 1px solid var(--gold);
}

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

.map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 380px;
}

.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========== CTA FINALE ========== */
.cta {
  background: linear-gradient(135deg, var(--navy), var(--navy-3));
  padding: 90px 0;
  text-align: center;
}

.cta h2 {
  color: #fff;
}

.cta p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* ========== FOOTER ========== */
.footer {
  background: #0e1d2c;
  color: rgba(255, 255, 255, 0.65);
  padding: 46px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.footer-small {
  font-size: 0.9rem;
}

.footer-small p {
  margin-bottom: 6px;
}

.footer a {
  color: var(--gold);
}

/* ========== WHATSAPP FISSO ========== */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
  transition: transform 0.25s ease;
}

.wa-float:hover {
  transform: scale(1.08);
}

/* ========== LIGHTBOX ========== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 20, 30, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

/* Stesso ritaglio anche a schermo intero */
#lightboxImg {
  height: 88vh;
  max-width: 92vw;
  width: auto;
  aspect-ratio: 1179 / 1830;
  object-fit: cover;
  object-position: 50% 57.9%;
  border-radius: 16px;
  box-shadow: var(--shadow-strong);
}

#lightboxImg.is-top {
  object-position: 50% 34.4%;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ========== ANIMAZIONI REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 1000px) {
  .cards,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(20, 39, 58, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav.open {
    max-height: 520px;
  }

  .nav a {
    width: 100%;
    text-align: center;
    padding: 16px;
    border-top: 1px solid var(--border);
  }

  .nav .btn-small {
    width: auto;
    margin: 16px auto 20px;
    border-top: none;
  }

  .hero {
    padding: 120px 0 70px;
  }

  .hero-inner,
  .about,
  .valuation,
  .contacts {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-photo {
    order: -1;
  }

  .photo-ring {
    max-width: 270px;
  }

  .badge {
    padding: 8px 12px;
    max-width: 150px;
  }

  .badge strong {
    font-size: 1rem;
  }

  .badge span {
    font-size: 0.7rem;
  }

  .badge-1 {
    left: 0;
  }

  .badge-2 {
    right: 0;
  }

  .stats-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .section {
    padding: 70px 0;
  }

  .sold-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Da telefono la foto top è una scheda grande a tutta larghezza */
  .sold-top {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 1179 / 1830;
  }

  .about-photo {
    max-width: 340px;
    margin: 0 auto;
  }

  .map {
    height: 300px;
  }
}

@media (max-width: 560px) {
  .cards,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .form {
    padding: 24px;
  }

  #lightboxImg {
    height: auto;
    width: 92vw;
  }
}