/* =========================
   Variabili globali
========================= */

:root {
  --bg: #f8fafc;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #334155;
  --text-soft: #475569;
  --heading: #0f172a;
  --border: #e2e8f0;
  --primary: #e78724;
  --primary-hover: #d1771c;
  --primary-soft: #fff7ed;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.06), 0 4px 6px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 30px 60px rgba(15, 23, 42, 0.1), 0 10px 15px rgba(15, 23, 42, 0.05);
  --radius: 16px;
  --radius-pill: 9999px;
  --container: 1120px;
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-heading: "Outfit", "Inter", sans-serif;
}

/* =========================
   Reset e base
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.01em;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--heading);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

p {
  margin: 0 0 16px;
}

ul {
  padding-left: 20px;
}

strong {
  color: var(--heading);
}

/* =========================
   Layout generico
========================= */

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.section {
  padding: 76px 0;
}

.section-alt {
  background: var(--bg-alt);
}

/* =========================
   Tipografia
========================= */

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--heading);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: var(--font-heading);
}

h1 {
  font-size: clamp(2.5rem, 4vw, 4.4rem);
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.7rem);
  margin-bottom: 22px;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.22rem;
  margin-bottom: 14px;
}

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-hover);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-intro {
  max-width: 860px;
  margin-bottom: 28px;
  color: var(--text-soft);
  line-height: 1.75;
}

/* =========================
   Header
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(242, 242, 240, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 84px;
  padding: 10px 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 320px;
  margin-right: 34px;
  padding-right: 34px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.site-brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.site-brand-name {
  color: var(--heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.15;
}

.site-brand-role {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: #6a6a6a;
}

/* =========================
   Navigazione desktop
========================= */

.site-nav-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: #333;
}

.site-nav a:hover {
  color: var(--primary);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  margin-left: 42px;
  padding: 10px 16px;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* =========================
   Bottoni
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: #ffffff;
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 10px 15px rgba(231, 135, 36, 0.15);
}

.btn-secondary {
  background: transparent;
  color: #2f2f2f;
  border-color: #2f2f2f;
}

.btn-secondary:hover {
  background: #2f2f2f;
  color: #ffffff;
  border-color: #2f2f2f;
}

/* =========================
   Hero
========================= */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  padding: 92px 0 76px;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
}

.hero-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.profile-container {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 50px;
  align-items: center;
}

.profile-image-wrapper {
  display: flex;
  justify-content: center;
}

.profile-image {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.section-dark {
  background-color: var(--heading);
  color: var(--surface-soft);
}

.section-dark h2 {
  color: var(--surface);
}

.section-dark .btn-secondary {
  border-color: var(--surface);
  color: var(--surface);
}

.section-dark .btn-secondary:hover {
  background: var(--surface);
  color: var(--heading);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.card-grid .card.reveal:nth-child(2) { transition-delay: 0.1s; }
.card-grid .card.reveal:nth-child(3) { transition-delay: 0.2s; }
.card-grid .card.reveal:nth-child(4) { transition-delay: 0.3s; }

.hero-subtitle {
  font-size: 1.24rem;
  color: var(--text);
  max-width: 820px;
  margin-bottom: 22px;
}

.hero-text {
  max-width: 780px;
  color: var(--text-soft);
}

.hero-text:last-of-type {
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
  margin-bottom: 28px;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.hero-highlights li {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

/* =========================
   Griglie e blocchi contenuto
========================= */

.card-grid,
.contact-grid,
.footer-grid {
  display: grid;
  gap: 22px;
}

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.card,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover,
.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card p,
.contact-card p {
  color: var(--text-soft);
  line-height: 1.72;
}

.contact-card .btn {
  margin-top: 10px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

/* =========================
   Accordion
========================= */

.accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 0;
  margin: 16px 0;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.accordion:hover {
  box-shadow: var(--shadow-hover);
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 17px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--heading);
  background: #ffffff;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  float: right;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--primary-hover);
}

.accordion[open] summary {
  background: var(--primary-soft);
}

.accordion[open] summary::after {
  content: "−";
}

.accordion-content {
  padding: 0 22px 20px;
  color: var(--text-soft);
  line-height: 1.72;
}

/* =========================
   Sezione contatti
========================= */

.contact-section-oldstyle {
  background: var(--bg-alt);
}

.contact-old-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 90px;
  align-items: center;
}

.contact-old-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-old-logo img {
  width: 100%;
  max-width: 300px;
  height: auto;
}

.contact-old-content {
  max-width: 760px;
}

.contact-old-title {
  margin: 0 0 24px;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2f2f2f;
}

.contact-old-subtitle {
  margin: 0 0 28px;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 400;
  color: #4a4a4a;
  background: none;
  padding: 0;
  display: block;
}

.contact-old-activity {
  margin: 0 0 26px;
  font-size: 1rem;
  line-height: 1.7;
  color: #5a5a5a;
}

.contact-old-details {
  margin: 0 0 34px;
}

.contact-old-details p {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.75;
  color: #5a5a5a;
}

.contact-old-credentials p {
  margin: 0 0 12px;
  font-size: 0.85rem;
  line-height: 1.75;
  color: #5a5a5a;
}

.contact-old-details strong,
.contact-old-credentials strong {
  font-weight: 600;
  color: #4a4a4a;
}

.contact-old-details a,
.contact-old-credentials a {
  color: var(--primary);
  text-decoration: none;
}

.contact-old-details a:hover,
.contact-old-credentials a:hover {
  text-decoration: underline;
}

.contact-old-credentials {
  margin-top: 26px;
}

.contact-old-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.contact-old-links .btn {
  padding: 16px 28px;
  font-size: 0.95rem;
  min-width: 180px;
  border-radius: 0;
}

/* =========================
   Sezione metodo di lavoro
========================= */

.method-section {
  background: var(--bg);
  padding: 72px 0;
}

.method-section-inner {
  max-width: 900px;
  text-align: center;
}

.method-eyebrow {
  margin: 0 0 18px;
  font-size: 1.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-hover);
}

.method-text {
  margin: 0 auto;
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.method-signature-block {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.method-signature-name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--heading);
}

.method-signature-image {
  max-width: 280px;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.98;
}

/* =========================
   Footer
========================= */

.site-footer {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 30px 0 14px;
}

.footer-grid--compact {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-col h3,
.site-footer h3,
.site-footer h4 {
  margin: 0 0 12px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #1f1f1f;
}

.footer-col p,
.site-footer p,
.site-footer a,
.site-footer li {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #4a4a4a;
}

.footer-col--about p {
  margin: 0 0 6px;
  line-height: 1.35;
}

.footer-col--contacts p {
  margin: 0 0 7px;
}

.footer-col--contacts a,
.site-footer a[href^="tel:"],
.site-footer a[href^="mailto:"],
.site-footer a[href*="linkedin.com"] {
  color: var(--primary);
  text-decoration: none;
}

.footer-col--contacts a:hover,
.site-footer a[href^="tel:"]:hover,
.site-footer a[href^="mailto:"]:hover,
.site-footer a[href*="linkedin.com"]:hover {
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.82rem;
  color: #6a6a6a;
  line-height: 1.4;
}

/* =========================
   Informative & Mappa
========================= */

.informative-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: stretch;
}

@media (max-width: 980px) {
  .informative-grid {
    grid-template-columns: 1fr;
    gap: 64px;
  }
  
  .informative-map {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }
}

.informative-content {
  display: flex;
  flex-direction: column;
}

.informative-map {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  min-height: 350px;
}

.informative-map iframe {
  width: 100%;
  height: 100%;
  min-height: 350px;
  display: block;
  object-fit: cover;
  border: 0;
}

.map-button-overlay {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: var(--surface);
  color: var(--heading);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-hover);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  white-space: nowrap;
  text-decoration: none;
}

.map-button-overlay:hover {
  color: var(--primary);
  transform: translateX(-50%) translateY(-3px);
}

/* =========================
   Trust & Assurance (UX Penale)
========================= */

.hero-micro-copy {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-soft);
  opacity: 0.85;
  font-style: italic;
}

.trust-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--heading);
  font-weight: 500;
  font-size: 0.95rem;
}

.trust-badge svg {
  color: var(--primary);
  opacity: 0.9;
}

.card-icon {
  margin-bottom: 22px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: var(--primary-soft);
  border-radius: 14px;
}

/* Espansione dei margini paragrafi nelle Card per abbassare carico cognitivo */
.card p {
  margin-bottom: 20px;
  line-height: 1.8;
}

/* =========================
   Mobile menu
========================= */

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #222;
}

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 0;
  }

  .site-brand {
    width: 100%;
    min-width: 0;
    justify-content: center;
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
  }

  .site-nav-wrap {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    background: #f5f5f3;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .site-nav-wrap.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .site-nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .site-nav a::after {
    display: none;
  }

  .nav-cta {
    margin: 16px 0 0;
    width: 100%;
    text-align: center;
  }

  .card-grid,
  .contact-grid,
  .footer-grid,
  .footer-grid--compact,
  .hero-container,
  .profile-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .profile-image-wrapper {
    order: -1;
  }

  .hero {
    padding-top: 82px;
  }
}

@media (max-width: 900px) {
  .contact-old-layout {
    grid-template-columns: 1fr;
    gap: 34px;
    align-items: start;
  }

  .contact-old-logo {
    justify-content: flex-start;
  }

  .contact-old-logo img {
    max-width: 180px;
  }

  .contact-old-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .contact-old-links {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-old-links .btn {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .site-footer {
    padding: 28px 0 14px;
  }

  .footer-grid--compact {
    gap: 26px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 58px 0;
  }

  .container {
    width: min(100% - 24px, var(--container));
  }

  .site-brand {
    align-items: center;
    gap: 14px;
  }

  .site-brand-name {
    font-size: 0.98rem;
  }

  .site-brand-role {
    font-size: 0.7rem;
  }

  .site-brand-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .hero-actions,
  .section-actions,
  .contact-old-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero-highlights {
    flex-direction: column;
    align-items: flex-start;
  }

  .card,
  .contact-card {
    padding: 20px;
  }

  .method-section {
    padding: 58px 0;
  }

  .method-text {
    font-size: 0.96rem;
  }

  .method-signature-image {
    max-width: 220px;
  }
}