/* ===========================
   style.css — Antonio Procopio
   Agente Finanziario & Consulente Assicurativo
   =========================== */

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

:root {
  /* Palette dal logo */
  --color-primary:      #1d3d4a;
  --color-secondary:    #2a5263;
  --color-accent:       #9b3535;
  --color-accent-light: #b84040;

  /* Neutri */
  --color-bg:           #ffffff;
  --color-bg-alt:       #f4f6f8;
  --color-text:         #1a1a2a;
  --color-muted:        #5c6370;
  --color-border:       #dde1e7;

  /* Tipografia */
  --font-heading:       'Montserrat', sans-serif;
  --font-body:          'Inter', sans-serif;

  /* Layout */
  --max-width:          1200px;
  --radius:             0px;         /* bordo 0 su card interne */
  --radius-btn:         999px;       /* pill su tutti i bottoni */
  --radius-card:        14px;        /* card servizi / contatti */
  --transition:         0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --section-py:         6rem;
}

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

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

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-accent); }

ul { list-style: none; }

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  font-weight: 500;
}

h1 {
  font-size: clamp(1.9rem, 3.2vw, 3.2rem);
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 em {
  font-style: normal;
  color: var(--color-accent);
  font-weight: 600;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  letter-spacing: -0.01em;
  font-weight: 600;
}

h3 { font-size: 1.15rem; font-weight: 500; }
h4 { font-size: 1rem; font-weight: 500; }

/* ===========================
   BUTTONS — pill (999px)
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 2rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-btn);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), transform 0.15s ease, box-shadow var(--transition);
  white-space: nowrap;
}

.btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(155, 53, 53, 0.28);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
}

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

.btn--nav {
  padding: 0.5rem 1.4rem;
  font-size: 0.8rem;
}

/* ===========================
   SECTION LAYOUT
   =========================== */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section header */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0.75rem auto 0;
  line-height: 1.7;
}

/* ===========================
   HEADER & NAV
   =========================== */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo__icon {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

.logo__name {
  display: none;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

nav ul a {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
}

nav ul a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

nav ul a:not(.btn):hover::after { width: 100%; }
nav ul a:not(.btn):hover { color: var(--color-primary); }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===========================
   HERO
   =========================== */
/* Wrapper esterno a piena larghezza per lo sfondo */
#hero-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}

#hero-wrapper::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(145deg, var(--color-bg-alt) 0%, #dde6eb 100%);
  border-radius: 48% 0 0 48%;
  z-index: 0;
  pointer-events: none;
}

#hero {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 3rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero__bg { display: none; }

.hero__label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero__label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--color-accent);
  flex-shrink: 0;
}

.hero__content {
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero__sub {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 500px;
  line-height: 1.75;
}

.hero__cta {
  display: flex;
  gap: 0.85rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Stats strip */
.hero__stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.hero__stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.hero__stat span {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: 0.2rem;
  display: block;
}

.hero__stat-sep {
  width: 1px;
  height: 40px;
  background: var(--color-border);
  flex-shrink: 0;
}

/* Hero Visual */
.hero__visual {
  animation: fadeUp 0.8s 0.12s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero__cards {
  position: relative;
  height: 380px;
}

.hero__card {
  position: absolute;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: 0 8px 32px rgba(29, 61, 74, 0.13);
  border: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
}

/* Main card */
.hero__card--main {
  top: 10%;
  left: 5%;
  right: 5%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  animation: float 7s ease-in-out infinite;
}

.hcard__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hcard__icon i {
  font-size: 1.5rem;
  color: #fff;
}

.hcard__label {
  display: block;
  font-size: 0.95rem;
  color: var(--color-text);
}

.hcard__val {
  display: block;
  font-size: 0.78rem;
  color: var(--color-muted);
  font-weight: 400;
  margin-top: 0.15rem;
}

/* Small cards */
.hero__card--sm {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.2rem;
  font-size: 0.85rem;
}

.hero__card--sm i { font-size: 1.2rem; color: var(--color-accent); }

.hero__card--sm1 {
  top: 42%;
  left: 10%;
  animation: float 6s 0.5s ease-in-out infinite;
}
.hero__card--sm2 {
  top: 58%;
  right: 8%;
  animation: float 8s 1s ease-in-out infinite;
}
.hero__card--sm3 {
  top: 76%;
  left: 20%;
  animation: float 5.5s 0.3s ease-in-out infinite;
}

/* ===========================
   SERVICES
   =========================== */
.section--services {
  padding: var(--section-py) 0;
  background: var(--color-bg-alt);
}

.services-block {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.services-group__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-border);
}

.services-group__icon { font-size: 1.15rem; }

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition),
              border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(29, 61, 74, 0.11);
  border-color: rgba(29, 61, 74, 0.1);
}

.service-card:hover::after { transform: scaleX(1); }

.service-card__icon {
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: block;
  line-height: 1;
}

.service-card h4 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.7;
}

/* ===========================
   CHI SONO
   =========================== */
.section--about {
  padding: var(--section-py) 0;
  background: #fff;
}

.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 5rem;
  align-items: center;
}

/* Photo */
.about__photo-wrap {
  position: relative;
}

.about__photo-bg {
  display: none;
}

.about__photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-card);
  box-shadow: none;
}

.about__content h2 { margin-bottom: 1.25rem; }

.about__content p {
  color: var(--color-muted);
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

.about__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
}

.badge__icon { font-size: 1rem; }

/* ===========================
   PERCHÉ SCEGLIERMI
   =========================== */
.section--values {
  padding: var(--section-py) 0;
  background: var(--color-bg-alt);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  counter-reset: values-counter;
}

.value-item {
  padding: 2rem 1.75rem;
  border-radius: var(--radius-card);
  background: #fff;
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.value-item::before {
  content: attr(data-num);
  position: absolute;
  top: -0.5rem;
  right: 1rem;
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 800;
  color: var(--color-accent);
  opacity: 0.08;
  line-height: 1;
  pointer-events: none;
  letter-spacing: -0.04em;
}

.value-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(29, 61, 74, 0.09);
}

.value-item__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.value-item__icon i { font-size: 1.4rem; color: #fff; }

.value-item h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.value-item p {
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.7;
}

/* ===========================
   CONTATTI — dark bg
   =========================== */
.section--contact {
  padding: var(--section-py) 0;
  background: var(--color-primary);
}

.section-header--light h2 { color: #fff; }
.section-tag--light { color: rgba(255, 255, 255, 0.6); }
.section-sub--light { color: rgba(255, 255, 255, 0.65); }

/* Contact cards grid — 2 colonne */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.4rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-card);
  color: #fff;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition),
              transform var(--transition);
  cursor: default;
}

a.contact-card {
  cursor: pointer;
}

a.contact-card:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  color: #fff;
}

/* WhatsApp accent */
.contact-card--whatsapp {
  border-color: rgba(37, 211, 102, 0.4);
}

.contact-card--whatsapp:hover {
  background: rgba(37, 211, 102, 0.12) !important;
  border-color: rgba(37, 211, 102, 0.6) !important;
}

.contact-card--whatsapp .contact-card__icon {
  background: #25d366;
}

/* Static card (no link) */
.contact-card--static { cursor: default; }
.contact-card--static:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: none;
}

/* Card parts */
.contact-card__icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-card__icon i { font-size: 1.5rem; color: #fff; }

.contact-card__body {
  flex: 1;
  min-width: 0;
}

.contact-card__body strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.2rem;
}

.contact-card__body span {
  font-size: 0.92rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.contact-card__arrow {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: color var(--transition), transform var(--transition);
}

a.contact-card:hover .contact-card__arrow {
  color: rgba(255, 255, 255, 0.9);
  transform: translate(2px, -2px);
}

/* Email card — stessa dimensione delle altre */
.contact-card--email .contact-card__body span {
  word-break: break-all;
}

/* Legal note */
.contact-legal {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.75rem;
}

.contact-legal p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  line-height: 2;
  word-break: normal;
  overflow-wrap: normal;
}

.contact-legal i { font-size: 1rem; }

.contact-legal strong { color: rgba(255, 255, 255, 0.75); }

.contact-legal a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
}

.contact-legal a:hover { color: #fff; }

/* ===========================
   FOOTER
   =========================== */
footer {
  background: #101e25;
  color: rgba(255, 255, 255, 0.55);
  padding: 3.5rem 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1.5rem;
}

.footer-brand img { filter: brightness(0) invert(1); margin-bottom: 1rem; }

.footer-brand p { font-size: 0.88rem; line-height: 1.65; }

.footer-links-col h4 {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1rem;
}

.footer-links-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links-col a {
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-links-col a:hover { color: #fff; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
}

.footer-credits a {
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}
.footer-credits a:hover { color: #fff; }

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

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

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about__photo-wrap { max-width: 340px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --section-py: 4rem; }

  /* Nav mobile */
  .burger { display: flex; }

  nav ul {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
    z-index: 99;
  }

  nav ul.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  nav ul li { border-bottom: 1px solid var(--color-border); }
  nav ul li:last-child { border-bottom: none; }
  nav ul a { display: block; padding: 0.85rem 0; }
  nav ul .btn { margin-top: 0.75rem; width: 100%; text-align: center; border-radius: var(--radius-btn); }

  /* Hero */
  #hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 0;
  }

  .hero__bg { display: none; }
  .hero__cards { height: 220px; }
  .hero__card--sm { font-size: 0.78rem; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  h1 { font-size: 2rem; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .service-cards { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .hero__stats { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .hero__stat-sep { width: 40px; height: 1px; }
}
