@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;600;700&family=Lora:wght@400;500;600&display=swap");

:root {
  --color-background: #FCEDE0;
  --color-accent: #A56F69;
  --color-text: #343A36;
  --color-white: #FFFFFF;
  --color-section: #F1DDD3;
  --color-primary-dark: #945E58;
  --color-sage: #DCE3DA;
  --color-text-secondary: #554744;
  --color-dark: #29313a;
  --font-body: "DM Sans", sans-serif;
  --font-heading: "Lora", Georgia, serif;
  --title-font-size: 4.75rem;      /* 76px */
  --subtitle-font-size: 2.375rem;  /* 38px */
  --content-font-size: 1.5625rem; /* 25px */
  --link-font-size: 1.375rem;      /* 22px */
  --footer-font-size: 1.25rem;  
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  font-size: var(--content-font-size);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) var(--color-background);
}

/* SCROLLBAR PERSONALIZZATA */

/* Chrome, Edge e Safari */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

.call-to-action-btn {
  padding: 14px 28px;
  border-radius: 999px;
  background-color: var(--color-dark);
  color: var(--color-white);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.navbar {
  position: relative;
  z-index: 1001;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.5rem 3rem;
}

.menu-toggle {
  width: 56px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  z-index: 1002;
  background: transparent;
  border: none;
}

.menu-toggle span {
  width: 38px;
  height: 2px;
  margin-bottom: 3px;
  background-color: var(--color-text);
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

.fullscreen-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: var(--color-background);
  z-index: 1000;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-15px);

  transition:
    opacity 0.4s ease,
    visibility 0.4s ease,
    transform 0.4s ease;
}

.fullscreen-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.menu-links li {
  list-style: none;
}

.menu-links a {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.menu-links a:hover {
  color: var(--color-accent);
}

body.menu-open {
  overflow: hidden;
}

header {
  background-color: var(--color-background);
  height: 95vh;
}

header nav {
  display: flex;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

header nav li {
  cursor: pointer;
}

header .nav-subtitle {
  white-space: nowrap;
}

header .hero-visual {
  position: relative;
  margin-left: 20px;
}

header .main-img {
  border-radius: 48% 48% 12px 12px;
  width: 93%;
  height: 560px;
  position: relative;
  object-fit: cover;
  object-position: 10% 2%;
  display: block;
  z-index: 1;
}

header .photo-backdrop {
  position: absolute;
  inset: 30px 0 0 72px;
  border-radius: 48% 48% 12px 12px;
  background: var(--color-section);
  transform: translate(-60px, 25px);
}

header .presentation {
  padding-left: 75px;
}

header .header-title {
  font-size: var(--title-font-size);
  letter-spacing: 0.2rem;
  font-family: var(--font-heading);
}

header .header-subtitle {
  font-size: var(--subtitle-font-size);
  margin: 0;
  font-family: var(--font-body);
  letter-spacing: 0.2rem;
  color: var(--color-accent);
  font-weight: 600;
}

header .presentation-text {
  font-size: var(--content-font-size);
  line-height: 1.5;
  margin: 0.5rem 0;
  color: var(--color-text);
  max-width: 600px;
  font-family: var(--font-body);
}

.chi-sono {
  padding: 8rem;
  background-color: var(--color-section); 
  align-items: flex-start;
}

.section-title {
  font-family: var(--font-heading);
  letter-spacing: 0.2rem;
  color: var(--color-accent);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 2rem;
}

.chi-sono .section-text {
  font-size: var(--content-font-size);
  line-height: 1.5;
  color: var(--color-text);
  max-width: 800px;
  font-family: var(--font-body);
  width: 85%;
  text-align: justify;
}

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

.chi-sono .gallery-img {
  width: 85%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 12px;
  
}

/* BACK TO TOP - MINIMAL */

.back-to-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 999;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: var(--color-section);
  color: var(--color-accent);

  border: 1px solid rgba(165, 111, 105, 0.553);
  border-radius: 50%;
  box-shadow: none;

  cursor: pointer;

  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease,
    background-color 0.3s ease;
}

/* FRECCIA */

.back-to-top svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.7;
}

/* VISIBILE */

.back-to-top.visible {
  opacity: 0.85;
  visibility: visible;
  transform: translateY(0);
}

/* HOVER */

.back-to-top:hover {
  opacity: 1;
  background-color: #EAD8D3;
  color: var(--color-primary-dark);
  transform: translateY(-2px);
}

/* ACCESSIBILITÀ */

.back-to-top:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 3px;
}

/* MOBILE */

@media (max-width: 768px) {
  .back-to-top {
    width: 36px;
    height: 36px;
    bottom: 18px;
    right: 18px;
  }
}

/* MOVIMENTO RIDOTTO */

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }

  .back-to-top:hover {
    transform: none;
  }
}

.percorsi-card {
  background-color: var(--color-white);
  padding: 1.5rem;
  border-radius: 12px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
  min-height: 250px;
}

.percorsi-card:hover {
  transform: translateY(-3px);
  background-color: var(--color-section);
}

.percorsi-card.reveal-ready.visible:hover {
  transform: translateY(-3px);
}

.card-title {
  font-size: var(--subtitle-font-size);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: var(--content-font-size);
  margin-bottom: 1rem;
}
  
.card-link {
  font-size: var(--link-font-size);
  color: var(--color-accent);
  text-decoration: underline;
  cursor: pointer;
}

.percorso-modal {
  position: fixed;
  inset: 0;
  margin: auto;

  width: calc(100% - 32px);
  max-width: 1100px;
  max-height: 90vh;

  padding: 0;
  border: none;
  border-radius: 16px;

  background: var(--color-white);
  color: var(--color-text);

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
}

.percorso-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.modal-layout {
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
}

.modal-image-wrapper {
  min-width: 0;
}

.modal-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;

  /* Sfumatura morbida sui bordi */
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    black 50%,
    transparent 85%
  );

  mask-image: radial-gradient(
    ellipse at center,
    black 50%,
    transparent 85%
  );
}

.modal-body {
  min-width: 0;
}


.modal-content {
  position: relative;
  padding: 50px 45px;
}

.modal-content h4{

}

.modal-title {
  font-size: var(--subtitle-font-size);
  font-weight: 500;
  margin-bottom: 25px;
}

.modal-text {
  font-size: var(--content-font-size);
  line-height: 1.5;
}

.modal-text p {
  margin-bottom: 16px;
}

.modal-text h4{
  
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;

  background: transparent;
  border: none;

  font-size: 32px;
  line-height: 1;
  cursor: pointer;

  transition: transform 0.2s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
}

.percorso-modal[open] {
  animation: modalAppear 0.3s ease forwards;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/** CONTACT SECTION */

.contact-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 8rem;
  background-color: var(--color-sage);
  font-size: var(--content-font-size);
}

.contact-info {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form-div {
  flex: 1 1 300px;
}

.contact-form-div form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form-div label {
  font-weight: 600;
}

.contact-form-div input,
.contact-form-div textarea {
  padding: 0.5rem;
  border: 1px solid #ccc;
}

.contact-form-div input {
  border-radius: 50px;
}

.contact-form-div textarea {
  border-radius: 15px;
}

.contact-form-div button {
  padding: 0.75rem;
  background-color: var(--color-dark);
  color: var(--color-white);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form-div button:hover {
  background-color: #4C5950;
}

/* FOOTER */
.menu-footer {
  position: absolute;
  bottom: 2rem;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--footer-font-size);
}

footer {
  text-align: center;
  background-color: var(--color-sage);
  color: var(--color-text-secondary);
  font-size: var(--footer-font-size);
}

@media (prefers-reduced-motion: reduce){
  html {
    scroll-behavior: auto;
  }

  .menu-toggle span,
  .fullscreen-menu,
  .menu-links a {
    transition: none;
  }

  .back-to-top {
    transition: none;
  }

  .percorso-modal[open] {
    animation: none;
  }

  .modal-close {
    transition: none;
  }
}

@media (max-width: 768px){
  .navbar {
    padding: 1rem 1.5rem;
  }

  .menu-links {
    gap: 1rem;
  }

  .chi-sono {
    flex-direction: column;
    padding: 3rem 1.5rem;
  }

  .chi-sono-content {
    /* position: static; */
  }

  .chi-sono .gallery {
    width: 100%;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .modal-content {
    padding: 45px 25px 30px;
  }

  .modal-title {
    font-size: 26px;
  }
}


header .header-title {
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.035em;
}


.card-title,
.modal-title {
    font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-primary, #A56F69);
  margin-bottom: 1.75rem;
}

.card-title { font-size: 1.65rem; }
.modal-title { font-size: clamp(1.75rem, 3vw, 2.25rem); }

header .presentation-text,
.chi-sono .section-text,
.card-text,
.modal-text {
  font-family: var(--font-body);
  font-size: var(--content-font-size);
  line-height: 1.8;
  letter-spacing: 0;
}

.section-text {
  text-align: justify;
}

.modal-text h4 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text, #343A36);

  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.modal-text h4:first-child {
  margin-top: 0;
}

.chi-sono .section-text { text-align: left; }
.card-text { margin-bottom: 1.5rem; }

.card-link,
.call-to-action-btn,
.contact-form-div button {
  font-family: var(--font-body);
  font-size: var(--link-font-size);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.menu-links a {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.contact-section,
.contact-form-div input,
.contact-form-div textarea {
  font-family: var(--font-body);
  font-size: var(--content-font-size);
  line-height: 1.7;
}

.contact-form-div input,
.contact-form-div textarea {
  padding: 0.2rem 0.5rem 0.2rem 0.5rem;
}

.contact-form-div .modality-group {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.contact-form-div .modality-group legend {
  margin-bottom: 1rem;
}

.contact-form-div .modality-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.contact-form-div .modality-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  cursor: pointer;
}

.contact-form-div input[type="radio"] {
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.contact-form-div input:not([type="radio"]),
.contact-form-div textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border: 1px solid #D6D0CB;
  font-size: var(--content-font-size);
  transition: border-color 0.2s ease;
}

.contact-form-div input:focus-visible,
.contact-form-div textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.contact-form-div form {
  gap: 1.5rem;
}

.contact-form-div label {
  font-weight: 500;
}

.contact-form-div textarea {
  min-height: 130px;
  resize: vertical;
}

button, input, textarea { font-family: inherit; }

@media (max-width: 768px) {
  .card-title { font-size: 1.5rem; }
  .card-text,
  header .presentation-text,
  .chi-sono .section-text,
  .modal-text { font-size: 1rem; }
}

/* COMMENTI ORIGINALI SPOSTATI ALLA FINE DEL FILE */

/* Palette applicata alle sezioni e agli elementi interattivi */
body {
  background-color: var(--color-background);
  color: var(--color-text);
}

.percorsi {
  /* background-image: var(--color-watercolor); */

  /* background-image: url('../assets/img/sfondo-acquerello-rosa-pastello.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center; */
  padding: 8rem;
}

.percorsi-card {
  color: var(--color-text);
  border: 1px solid rgba(52, 58, 54, 0.08);
}

.percorsi-card:focus-visible,
.call-to-action-btn:focus-visible,
.contact-form-div button:focus-visible {
  outline: 3px solid var(--color-primary-dark);
  outline-offset: 3px;
}

.card-link,
.contact-info a {
  color: var(--color-primary-dark);
}

.contact-form-div input,
.contact-form-div textarea {
  background-color: var(--color-white);
  color: var(--color-text);
}

.call-to-action-btn:hover {
  background-color: var(--color-section);
  color: var(--color-text);
}



/*
$color-background: #F9EBE7;
$color-watercolor: #F7D8D2;
$color-card: #F7D4CD;
$color-peach: #FFC2AC;
$color-accent: #C78E88;

$color-text: #262020;
$color-text-secondary: #554744;
$color-white: #FFFFFF;

// Esempio di utilizzo
body {
  background-color: $color-background;
  color: $color-text;
}

.hero {
  background-color: $color-background;
}

.photo-backdrop {
  background-color: $color-card;
}

.call-to-action-btn {
  background-color: $color-text;
  color: $color-white;
  border-radius: 999px;
  padding: 14px 28px;

  &:hover {
    background-color: #704D49;
  }
}
*/


/* .sfondo-acquerello {
  background-color: #F9EBE7;

  background-image:
    radial-gradient(
      ellipse at 0% 0%,
      rgba(247, 180, 170, 0.55) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 100% 100%,
      rgba(255, 194, 172, 0.45) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 25% 15%,
      rgba(247, 216, 210, 0.6) 0%,
      transparent 40%
    );

  background-repeat: no-repeat;
} */

/* .sfondo-acquerello {
  background-color: #F9EBE7;
  background-image: url("../assets/img/sfondo-acquerello.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
} */




/* LISTA CONTATTI */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;

  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ICONE */

.contact-list svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;

  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;

  transition:
    stroke 0.3s ease,
    transform 0.3s ease;
}

/* LINK */

.contact-list a {
  color: var(--color-text);
  text-decoration: none;
  overflow-wrap: anywhere;

  transition: color 0.3s ease;
}

/* HOVER */

.contact-list li:hover svg {
  stroke: var(--color-primary-dark);
  transform: translateY(-2px);
}

.contact-list li:hover a {
  color: var(--color-primary-dark);
}

.contact-list a:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 4px;
  border-radius: 3px;
}

/* RESPONSIVE */

@media (max-width: 768px) {
  .contact-list {
    gap: 1rem;
  }

  .contact-list svg {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-list svg,
  .contact-list a {
    transition: none;
  }

  .contact-list li:hover svg {
    transform: none;
  }
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-accent);
  border-radius: 50%;
  transition:
    color 0.3s ease,
    background-color 0.3s ease,
    transform 0.3s ease;
}

.instagram-link:hover {
  color: var(--color-primary-dark);
  background-color: var(--color-section);
  transform: translateY(-3px);
}

.instagram-link:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .instagram-link {
    transition: none;
  }
}

/* FOOTER INSIDE MENU */


/*Animazioni */ 

/* ANIMAZIONI ENTRATA ALLO SCROLL */

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

.reveal.reveal-ready {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Ritardi progressivi */

.reveal-delay-1 {
  transition-delay: 0.1s !important;
}

.reveal-delay-2 {
  transition-delay: 0.2s !important;
}

.reveal-delay-3 {
  transition-delay: 0.3s !important;
}

/* Accessibilità */

@media (prefers-reduced-motion: reduce) {
  .reveal.reveal-ready {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
}

.parallax-image {
  transform: translate3d(0, 0, 0);
  transition: none;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .parallax-image {
    transform: none !important;
    will-change: auto;
  }
}

/* =============================================
   RESPONSIVE LAYOUT — TABLET E MOBILE
   Overrides delle regole desktop precedenti.
============================================= */

/* Base fluida e protezione contro overflow */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { min-width: 320px; }
img, svg { max-width: 100%; }
.hero-layout, .about-row, .approach-row,
.contacts-layout, .percorsi-grid { width: 100%; min-width: 0; }
.hero-layout > *, .about-row > *, .approach-row > *,
.contacts-layout > * { min-width: 0; }

/* Desktop fluido */
header { height: auto; min-height: min(95vh, 900px); padding: 0 clamp(1.5rem, 4vw, 4rem) 4rem; }
header nav { flex-shrink: 0; }
header .hero-layout { flex: 1; gap: clamp(2rem, 4vw, 4.5rem); }
header .hero-visual { flex: 1 1 47%; min-width: 0; margin-left: 1rem; }
header .main-img { width: 93%; height: clamp(360px, 52vw, 555px); }
header .presentation { flex: 1 1 55%; min-width: 0; padding-left: clamp(0px, 3vw, 75px); }
header .presentation-text { font-size: clamp(1rem, 1.7vw, 1.5rem); }
.chi-sono, .percorsi, .contact-section { padding: clamp(3.5rem, 7vw, 8rem) clamp(1.5rem, 5vw, 8rem); }
.chi-sono .section-text { width: 100%; font-size: clamp(1rem, 1.65vw, 1.5rem); }
.chi-sono .gallery-img { width: 100%; }
.about-row, .approach-row { gap: clamp(1.5rem, 4vw, 4rem); }
.percorsi-grid { gap: clamp(1rem, 2vw, 1.75rem); }
.percorsi-card { min-width: 0; }
.card-text, .modal-text, .contact-section { font-size: clamp(1rem, 1.5vw, 1.5rem); }
.contacts-layout { gap: clamp(2rem, 5vw, 7.5rem); align-items: flex-start; }
.contact-info, .contact-form-div { min-width: 0; }
.contact-form-div input:not([type="radio"]), .contact-form-div textarea { font-size: 1rem; }

/* Tablet */
@media (max-width: 1024px) {
  header { min-height: auto; padding: 0 2rem 4rem; }
  header .hero-layout { gap: 2rem; }
  header .main-img { height: clamp(340px, 48vw, 520px); }
  header .presentation { padding-left: 0; }
  header .header-title { font-size: clamp(2.4rem, 5vw, 3.5rem); }
  header .header-subtitle { font-size: clamp(1.15rem, 2.5vw, 1.65rem); }
  .chi-sono, .percorsi, .contact-section { padding: 4.5rem 2.5rem; }
  .section-title { font-size: clamp(2rem, 3.5vw, 2.6rem); }
  .percorsi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .percorsi-card { min-height: 220px; }
  .contacts-layout { gap: 2.5rem; }
  .contact-info, .contact-form-div { flex: 1 1 0; }
  .contact-list a { font-size: 1rem; }
   .modal-layout {
    gap: 1.5rem;
  }

  .percorso-modal .modal-content {
    padding: 40px 30px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  header { padding: 0 1.25rem 3rem; min-height: auto; }
  header nav { padding: .75rem 0; margin-bottom: 1.5rem; }
  .menu-toggle { width: 48px; height: 48px; }
  .menu-toggle span { width: 32px; }
  .fullscreen-menu { padding: 5rem 1.25rem 6rem; overflow-y: auto; }
  .menu-links { gap: clamp(.65rem, 3vh, 1.25rem); }
  .menu-links a { font-size: clamp(1.8rem, 8vw, 2.7rem); }
  .menu-footer { bottom: 1.25rem; width: calc(100% - 2.5rem); font-size: .8rem; line-height: 1.5; }

  header .hero-layout { flex-direction: column; align-items: stretch; gap: 2.25rem; }
  header .hero-visual { width: min(100% - 1rem, 440px); flex: none; margin: 0 auto; }
  header .main-img { height: clamp(310px, 95vw, 500px); }
  header .photo-backdrop { inset: 25px 0 0 51px; transform: translate(-41px, 15px); }
  header .presentation { width: 100%; flex: none; padding: 0; }
  header .header-title { font-size: clamp(2.5rem, 10vw, 3.6rem); }
  header .header-subtitle { font-size: 1.2rem; letter-spacing: .15rem; }
  header .presentation-text { font-size: 1rem; line-height: 1.65; max-width: 42rem; }
  .call-to-action-btn { min-height: 48px; padding: .75rem 1.35rem; }

  .chi-sono, .percorsi, .contact-section { padding: 3.5rem 1.25rem; }
  .chi-sono { gap: 3.5rem; }
  .about-row, .approach-row { flex-direction: column; align-items: stretch; gap: 1.5rem; }
  .about-row > *, .approach-row > * { flex: none; width: 100%; }
  .approach-row > :first-child { order: 2; }
  .approach-row > :last-child { order: 1; }
  .section-title { font-size: clamp(1.9rem, 7vw, 2.4rem); letter-spacing: .06rem; margin-bottom: 1.25rem; }
  .chi-sono .section-text { width: 100%; font-size: 1rem; line-height: 1.75; text-align: left; }
  .chi-sono .gallery-img { width: 100%; height: auto; max-height: 480px; object-fit: cover; }
  .parallax-image { transform: none !important; will-change: auto; }

  .percorsi-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .percorsi-card { min-height: 0; padding: 1.4rem; }
  .card-title { font-size: 1.5rem; margin-bottom: .75rem; }
  .card-text { font-size: 1rem; line-height: 1.65; }
  .card-link { font-size: .95rem; }

  .contacts-layout { flex-direction: column; gap: 2.75rem; }
  .contact-info, .contact-form-div { width: 100%; flex: none; }
  .contact-section { font-size: 1rem; }
  .contact-list { gap: 1rem; }
  .contact-list li { align-items: flex-start; gap: .75rem; }
  .contact-list svg { width: 22px; height: 22px; margin-top: .2rem; }
  .contact-list a { font-size: 1rem; overflow-wrap: anywhere; }
  .contact-form-div form { gap: 1rem; }
  .contact-form-div form > .flex { flex-direction: column; }
  .contact-form-div label, .contact-form-div .modality-group legend { font-size: 1rem; }
  .contact-form-div .modality-options { gap: .75rem 1.5rem; }
  .contact-form-div input:not([type="radio"]), .contact-form-div textarea { font-size: 16px; }
  .contact-form-div button { min-height: 48px; }

  .percorso-modal { width: calc(100% - 1.5rem); max-height: min(85dvh, 800px); }
  .modal-content { padding: 3.5rem 1.25rem 1.5rem; }
  .modal-title { font-size: 1.75rem; }
  .modal-text { font-size: 1rem; line-height: 1.7; }
  .modal-close { top: .65rem; right: .75rem; min-width: 44px; min-height: 44px; }
  footer { padding: 1rem 1.25rem 1.5rem; font-size: .85rem; }
   .percorso-modal {
    width: calc(100% - 24px);
    max-height: 90dvh;
  }

  .modal-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .modal-image {
    max-width: 220px;
    margin: 0 auto;
  }

  .percorso-modal .modal-content {
    padding: 50px 20px 24px;
  }
}

/* Smartphone stretti */
@media (max-width: 380px) {
  header, .chi-sono, .percorsi, .contact-section { padding-left: 1rem; padding-right: 1rem; }
  header .main-img { height: 310px; }
  .contact-form-div .modality-options { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .parallax-image { transform: none !important; }
}


/*MAINTENANCE SCREEN */
/* MODALITÀ MANUTENZIONE */

.maintenance-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 100dvh;
  padding: 24px;

  background-color: #FAF7F3;
}

.maintenance-box {
  width: 100%;
  max-width: 450px;
  text-align: center;
}

.maintenance-box h1 {
  font-family: var(--font-heading);
  color: var(--color-accent);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
}

.maintenance-box p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
}

.maintenance-box form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.maintenance-box input {
  padding: 14px 18px;
  border: 1px solid #D6D0CB;
  border-radius: 30px;
  background: white;
  font-size: 1rem;
}

.maintenance-box button {
  padding: 14px 24px;
  border: none;
  border-radius: 30px;
  background: var(--color-dark);
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

#maintenance-error {
  color: #A43D3D;
  min-height: 1.5rem;
}

.maintenance-screen.is-unlocked {
  display: none;
}

/* SPAZIATURA HERO — desktop e mobile */
header .presentation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

header .presentation .header-title {
  margin: 0 0 0.35rem;
  line-height: 1.15;
}

header .presentation .header-subtitle {
  margin: 0 0 1.75rem;
  line-height: 1.3;
}

header .presentation .presentation-text {
  margin: 0 0 2rem;
  line-height: 1.7;
  max-width: 600px;
}

header .presentation .call-to-action-btn {
  margin-top: 0;
}

@media (max-width: 768px) {
  header .presentation .header-title { margin-bottom: 0.3rem; }
  header .presentation .header-subtitle { margin-bottom: 1.25rem; }
  header .presentation .presentation-text {
    margin-bottom: 1.5rem;
    line-height: 1.65;
  }
}


/* GERARCHIA TIPOGRAFICA UNIFICATA — desktop, tablet e mobile */
header .presentation .header-title {
  font-family: var(--font-heading);
  font-size: clamp(2.375rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
header .presentation .header-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 600;
  letter-spacing: 0.12em;
}
header .presentation .presentation-text {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.75;
  max-width: 560px;
}
header .presentation .call-to-action-btn { font-size: 1rem; font-weight: 600; }
.section-title { font-size: clamp(1.875rem, 3.3vw, 2.5rem); letter-spacing: 0.03em; }
.chi-sono .section-text, .card-text, .modal-text {
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  line-height: 1.75;
}
.card-title { font-size: 1.6875rem; }
.modal-title { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
.contact-section { font-size: clamp(1rem, 1.5vw, 1.1875rem); }
.contact-form-div input, .contact-form-div textarea { font-size: 1rem; }
@media (max-width: 768px) {
  header .presentation .header-title { font-size: 2.375rem; }
  header .presentation .header-subtitle { font-size: 1.25rem; }
  header .presentation .presentation-text { font-size: 1rem; line-height: 1.7; }
  .section-title { font-size: 1.875rem; }
  .card-title { font-size: 1.4375rem; }
  .chi-sono .section-text, .card-text, .modal-text { font-size: 1rem; }
}


.contact-form-div {
  .contact-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0.85rem 1.75rem;
    background: var(--color-dark);
    color: var(--color-white);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition:
      background-color 0.25s ease,
      opacity 0.25s ease;

    &:hover:not(:disabled) {
      background: var(--color-primary-dark);
    }

    &:disabled {
      opacity: 0.75;
      cursor: wait;
    }
  }

  .submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: contact-spin 0.7s linear infinite;
  }

  button.is-loading .submit-spinner {
    display: inline-block;
  }

  .contact-status {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;

    &:empty {
      display: none;
    }

    &.success {
      color: #285B40;
      font-weight: 600;
    }

    &.error {
      color: #9A3636;
      font-weight: 600;
    }
  }
}

@keyframes contact-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-form-div .submit-spinner {
    animation-duration: 2s;
  }
}

.privacy-field {
  margin-top: 0.5rem;

  .privacy-label {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    cursor: pointer;
  }

  input[type="checkbox"] {
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    margin-top: 0.2rem;
    accent-color: var(--color-accent);
    cursor: pointer;
  }

  a {
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;

    &:hover {
      color: var(--color-text);
    }
  }

  .privacy-note {
    margin: 0.75rem 0 0 2rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
  }
}

#percorso-modal {
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#percorso-modal::backdrop {
  background: rgba(41, 49, 58, 0.65);
}

.contact-divider {
  border: 1px solid var(--color-divider);
  margin: 0.1rem 0;
  width: 50%;
}

/* Impedisce la propagazione dello scroll */
html:has(#percorso-modal[open]) {
  overflow: hidden;
}

#percorso-modal {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Area interna scorrevole */
#modal-text {
  overscroll-behavior: contain;
}