/* ===============================
   1. Variabili e base
================================ */

:root{
  --bg:#070A10;
  --card:#0B1020;
  --card2: rgba(255,255,255,.035);
  --mobile-menu:#0b10204c;
  --text:#EAF0FF;
  --muted:rgba(218, 227, 255, 0.72);
  --line:rgba(255,255,255,.12);
  --accent:#7C5CFF;
  --accent2:#33D6FF;
  --accent3: #33d6ff31;
  --accent4: #33d6ff75;
  --radius:18px;
}

/* ===============================
   2. Layout generale
================================ */

html, body{
  overflow-anchor: none;
}

*{box-sizing:border-box;}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(900px 600px at 10% -10%, rgba(124,92,255,.22), transparent 60%),
  radial-gradient(900px 600px at 90% 10%, rgba(51,214,255,.18), transparent 55%),
  var(--bg);
  z-index: -1; 
  pointer-events: none;
  transform: translateZ(0); 
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3,
.navLinks a {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

a, p, li, button, input, textarea, label {
  font-family: inherit;
}

h1{
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.02;
  margin: 10px 0;
  font-weight: 700;
}

h2{
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 0 0 8px;
  font-weight: 700;
}

h3{
  margin: 0 0 10px;
  font-weight: 650;
}

html {
  overflow-y: scroll;
  scroll-behavior: auto !important;
}

* {
  overflow-anchor: none !important;
}

html { scrollbar-gutter: stable; }
body { scrollbar-width: none; }          /* Firefox */
body::-webkit-scrollbar { width: 0; height: 0; } /* Chromium */

a{color:inherit;}
.container{
  width:min(1100px, 92%);
  margin:0 auto;
}
.section{padding:36px 0;}
.section.alt{ border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.section.project{ border-top:1px solid var(--line);}

.sectionHead{margin-bottom:22px;}

.lead{font-size: clamp(16px, 2.1vw, 18px); color:var(--muted); max-width: 52ch;}
.muted{color:var(--muted);}
.tiny{font-size:13px;}
.smallTitle{font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);}

/* ===============================
   3. Navbar
================================ */

.nav.nav--hidden{
  transform: translateY(-120%);
}

.nav{
    display: flex;
    align-items: center;
    justify-content: center;
    padding:0 20px 25px;
    padding-bottom: 25px;
    width: 100%;
    position: relative;
    z-index: 999;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    transform: translateY(0);
    transition: transform .30s ease-in-out;
}

.nav-wrap{
  width: min(1100px, 92%);
  background: rgba(11, 16, 32, .72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 0 32px;
  border: 1px solid var(--accent3);
  border-top: 0;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  box-shadow: 0 10px 25px var(--accent3);
  max-height: 56px;
}
.nav-row{
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navLinks{
    display: flex;
    gap:18px;
    align-items: center;
}
.navLinks a{
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  font-style: normal;
  padding: 8px 12px;
  height: auto;
  display: flex;
  align-items: center;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  border-radius: 999px;
}

.navLinks a:hover{
  color: var(--accent4);
  background: rgba(255,255,255,.055);
  box-shadow: 0 0 2px var(--accent2);
  border-color: var(--accent3);
  transition: .3s ease-in-out;
}

.bar1, .bar2, .bar3 {
  width: 35px;
  height: 5px;
  background-color: #005d75;
  margin: 6px 0;
  transition: 0.4s;
  border-radius: 2.5px;
}

/* Rotate first bar */
.change .bar1 {
  transform: translate(0, 11px) rotate(-45deg);
}

/* Fade out the second bar */
.change .bar2 {opacity: 0;}

/* Rotate last bar */
.change .bar3 {
  transform: translate(0, -11px) rotate(45deg);
}

/* === dropdown sotto la nav === */
.mobile-menu{
  position: static;
  width: 100%;
  display: flex;
  justify-content: center;

  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;

  transition: max-height .30s ease, opacity .18s ease, transform .18s ease;
}

/* pannello del dropdown */
.mobile-menu__panel{
  width: 100%;
  padding: 10px 0 14px;
  border-radius: 0 0 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

/* stato aperto */
.menu-open .mobile-menu{
  max-height: 300px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-open .mobile-menu__panel{
  opacity: 1;
}

.menu-open .nav-wrap{
  max-height: 350px; 
  padding-bottom: 10px;
}

/* link nel dropdown */
.mobile-menu a {
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(234,240,255,.82);
  font-weight: 700;
  background: rgba(255,255,255,.03);
  border-bottom: 2px solid rgba(51,214,255,.22);
}

.mobile-menu a:active{
  transform: scale(.98);
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle{
    width: 44px;
    height: 44px;
    border: 1px solid rgba(51, 214, 255, .18);
    border-radius: 12px;
    background: rgba(255,255,255,.035);
    display: none;
}

.brand-wrap{
    height: 50px;
    width: 150px;
    display: flex;
    align-items: center;
}

.brand-wrap img{
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.brandDesk{ display:block; }
.brandMobile{ display:none; }

/* ===============================
   4. Hero
================================ */

.hero .trust-item {
  padding: 13px 14px;
  border: 1px solid rgba(51, 214, 255, .16);
  border-radius: 14px;
  background: rgba(255,255,255,.032);

}

.badge{
  display:inline-flex;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,.04);
  font-size:20px;
  box-shadow: 0 0 5px var(--accent2);
}

.badge-container{
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.grid{display:grid; gap:16px;
    grid-template-columns: repeat(3,1fr);
    margin-top: 18px;}

.grid2{display:grid; gap:16px;
    margin-top: 18px;}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(51,214,255,.65));
  text-decoration:none;
  font-weight:700;
}
.btn.ghost{
  background: rgba(255,255,255,.04);
}

.btn.small{padding:10px 12px; border-radius:12px; font-size:14px;}
.btn.small:hover{
    
    transform: translateY(-1px);
    transition: all 0.3s ease;
}
.btn:active{transform: scale(.98);}

.hero{padding:86px 0 56px;}

.heroGrid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:stretch;
}

.heroCta {
  margin-top: 22px;
  display: flex;
  gap: 10px;
}

.heroCta .btn {
  min-height: 46px;
  padding-inline: 18px;
}


.heroCta a:hover{
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

@media (max-width: 860px) {
  .hero {
    padding: 36px 0 42px;
  }

  .heroGrid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero .trustGrid {
    grid-template-columns: 1fr;
  }

  .heroCta {
    flex-direction: column;
    gap: 10px !important;
  }

  .heroCta .btn {
    width: 100%;
  }
}

.trustList{list-style:none; padding:0; margin:14px 0 0; display:grid; gap:8px; color:var(--muted);}

.trustGrid{
  display:grid;
  margin: 20px 0;
  margin-right: 30px;
  gap:10px;
}

/* testo nascosto prima dello scroll, per l'animazione word-fade */
.word-fade {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  filter: blur(8px);
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
  transition-delay: var(--word-delay, 0ms);
  margin: 0 2px;
}

/* stato finale, attivato dall'observer in script.js */
.word-fade.start-animation {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* titoli/etichette in strong dentro hero e trust-item */
.heroItem strong,
.trust-item > strong.typewriter-text {
    color: var(--text) !important;
    display: block;
    margin-bottom: 8px;
}

/* testo dei paragrafi con animazione typewriter */
p.typewriter-text,
p.typewriter-text .word-fade,
p.typewriter-text strong {
    color: var(--muted) !important;
}

/* strong con typewriter-text fuori da un paragrafo (es. "Francesco") */
strong.typewriter-text {
    color: var(--text) !important;
}

/* evita che parole lunghe rompano il layout */
.typewriter-text {
    overflow-wrap: break-word;
    word-break: break-word;
}


.trust-item{
  padding:14px 0;
  border-radius:14px;
  
}

.trust-item strong{
  font-weight:700;
  color:var(--text);
  text-decoration: underline;
}

.hero .trust-item p {
  border-bottom: 0;
  padding-bottom: 0;
  font-size: 13.5px;
  line-height: 1.45;
}

.hero .trust-item strong {
  text-decoration: none;
  font-size: 14px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.heroItem {
  padding: 14px 0;
  border-top: 1px solid var(--accent3);
}

.heroItem:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.heroItem strong {
  display: block;
  font-size: 15.5px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.heroItem p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.heroCardInner h3{
    font-weight: bold;
    font-size:22px;
}

.heroCard{
  border: 1px solid rgba(51,214,255,.20);
  box-shadow: 0 28px 90px rgba(0,0,0,.34);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
}

.heroCard::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(51,214,255,.55), transparent);
}

.heroCardInner{padding:24px;}

.heroCardInner h3 {
  font-size: 26px;
  margin-bottom: 18px;
}

/* ===============================
   5. Componenti condivisi
================================ */

.projectCard,
.stepCard,
.packCard,
.Contactcard,
.FaqContainer,
.noteBox{
  border: 1px solid var(--accent3);
  background: rgba(255,255,255,.04);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}

.projectCard,
.stepCard,
.packCard,
.noteBox{
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.stepCard:hover,
.noteBox:hover{
  transform: translateY(-3px);
  border-color: rgba(51,214,255,.28);
  background: rgba(255,255,255,.055);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  filter: saturate(1.05) brightness(1.04);

}

/* ===============================
   6. Progetti
================================ */

.projectCard{
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  height: 100% !important;
}

.projectCard:focus-visible{
  outline: 2px solid rgba(51,214,255,.8);
  outline-offset: 4px;
  border-radius: var(--radius);
}

#progetti .container > .muted {
  max-width: 62ch;
  line-height: 1.65;
}

#projectsGrid {
  align-items: stretch;
}

.projectCard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
}

.projectWrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: auto;
  min-height: 250px;
  padding: 18px;
}

.projectTop {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* margin-bottom: 12px; */
  padding-bottom: 10px;
  border-bottom: 1px solid var(--accent3);
}


.projectTop h3 {
  font-size: 21px;
  line-height: 1.1;
  margin: 0;
}

.projectWrap > .muted {
  margin: 0;
  line-height: 1.6;
  font-size: 14.5px;
}

.projectOpen{
  color:var(--text);
  position: absolute !important;
  bottom: 16px;
}

.imgThumb{
    height: 140px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}
.pill{
  position:absolute; top:12px; left:12px;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid rgba(51, 214, 255, .18);
  border-radius: 999px;
  background: rgba(51, 214, 255, 0.250);
  box-shadow: 0 14px 32px rgba(51, 214, 255, .14);
  color: rgba(234, 240, 255, .78);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  backdrop-filter: blur(8px);
  text-shadow: 0 0 5px black !important;
}

.projectPills{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.packagePill{
  color: var(--text);
  border-color: rgba(51, 214, 255, .22);
  background: rgba(51, 214, 255, .08);
}

.ghostPill{opacity:.8;}
.btn.small{margin-bottom:10px;}

.projectImg {
  height: 190px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(51, 214, 255, .16);
  position: relative;
}

.projectImg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(7,10,16,.34));
  pointer-events: none;
}


/* ===============================
   7. Metodo
================================ */

#metodo .sectionHead .muted {
  max-width: 58ch;
  line-height: 1.65;
}

.stepsGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stepCard {
  width: auto;
  height: auto;
  min-height: 210px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.stepCard h3 {
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.stepCard p {
  margin: 0;
  line-height: 1.58;
  font-size: 14.5px;
}

.noteBox {
  margin-top: 18px;
  padding: 18px 20px;
  background: rgba(51, 214, 255, .045);
  opacity: 0.7;
}

.noteBox h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.noteBox p {
  margin: 0;
  line-height: 1.6;
}

/* ===============================
   8. Chi sono
================================ */

#chi-sono .container{
  display: flex;
  justify-content: center;
}

.aboutProfile{
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0 22px;
}

.aboutPhoto{
  width: 96px;
  height: 96px;
  min-width: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 3px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(135deg, var(--accent), var(--accent2)) border-box;
}

.aboutName{
  display: block;
  font-size: 17px;
  color: var(--text);
}

.aboutRole{
  display: block;
  font-size: 13.5px;
  margin-top: 2px;
}

#chi-sono .trustGrid {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
}

#chi-sono .trust-item {
  padding: 20px;
  border: 1px solid rgba(51, 214, 255, .16);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}

#chi-sono .trust-item strong {
  display: block;
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.25;
  color: var(--text);
}

#chi-sono .trust-item p {
  margin: 0;
  padding-bottom: 0;
  border-bottom: 0;
  line-height: 1.7;
  font-size: 15.5px;
}

#chi-sono p.typewriter-text strong {
  display: inline;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: var(--text) !important;
  font-weight: 700;
}

@media (max-width: 640px) {
  #chi-sono .trust-item {
    padding: 18px;
  }

  #chi-sono .trust-item p {
    font-size: 15px;
  }
}

/* ===============================
   9. Contatti e FAQ
================================ */

.contact-main-wrapper {
  display: grid;
  gap: 24px;
}

.contactTitle {
  max-width: 760px;
}

.contactTitle strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.25;
  color: var(--text);
}

.contactTitle p {
  max-width: 62ch;
  line-height: 1.65;
}

.contactButton-wrap {
  padding: 14px 0 0;
  gap: 12px;
  flex-wrap: wrap;
}

.contactGrid{
  display:grid;
  grid-template-columns: 1.2fr 1.2fr;
  gap:18px;
  align-items:stretch;
}
.contactButtons{display:flex; gap:10px; flex-wrap:wrap; margin:14px 0; row-gap: 12px;}
.Contactcard form {
  display: grid;
  gap: 10px;
}

.Contactcard label {
  margin-top: 4px;
}


.Contactcard input,
.Contactcard textarea,
.customSelectBtn {
  min-height: 46px;
}

#message {
  min-height: 130px;
}




.miniList{color:var(--muted); margin:10px 0 0; padding-left:18px;}

label{
    display: block;
    margin: 10px 0 6px;
    color: var(--muted);
}

input, textarea{
    width: 100%;
    background-color: rgba(255,255,255,.03);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    color: var(--text);
    outline: none;
    font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
    font-weight: 400;
    font-style: normal;
}

.consentLabel{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 4px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.consentLabel input[type="checkbox"]{
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 3px;
  padding: 0;
  accent-color: var(--accent2);
  cursor: pointer;
}

.consentLabel a{
  color: var(--accent2);
  font-weight: 600;
}

/* ===== Custom Select (sempre sopra) ===== */
.customSelectBtn{
  width:100%;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 44px 11px 12px;
  color: var(--text);
  text-align:left;
  cursor:pointer;
  font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
  position: relative;
  transition: border-color .2s ease, box-shadow .2s ease, transform .18s ease;
}

.customSelectBtn:hover{
  
  transform: translateY(-1px);
}

.customSelectArrow{
  position:absolute;
  right:12px;
  top:50%;
  width:14px;
  height:14px;
  transform: translateY(-50%) rotate(90deg);
  transform-origin:center;
  transition: transform .22s ease;
  background: url("./assets/arrow-right.svg") center/14px 14px no-repeat;
  opacity:.9;
}

.select-open .customSelectArrow{
  transform: translateY(-50%) rotate(-90deg);
}

/* dropdown sempre sopra il bottone */
.customSelectList{
  position:absolute;
  left:0;
  right:0;
  bottom: calc(100% + 8px);
  margin:0;
  padding:10px;
  list-style:none;

  background: rgba(10,14,22,.96);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0,0,0,.55);
  backdrop-filter: blur(12px);

  opacity:0;
  transform: translateY(6px);
  pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
}

.select-open + .customSelectList{
  opacity:1;
  transform: translateY(0);
  pointer-events:auto;
}

.customSelectList .optionList{
  padding: 12px 12px;
  margin: 10px 0;
  border-radius: 12px;
  cursor:pointer;
  color:#fff;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.04);
  transition: transform .12s ease, box-shadow .12s ease;
}

.customSelectList .optionList:first-child{
  margin-bottom:0;
}

.customSelectList .optionList:last-child{
  margin-top:0;
}

.customSelectList .optionList:hover{
  background: rgba(255,255,255,.075);
  border-color: rgba(51,214,255,.24);
  box-shadow: none;
  transform: translateY(-1px);
  color:var(--accent4);
}

/* Contenitore relativo */
.select-wrap{ position: relative; }

.altro{
  display:none !important;
}

textarea{
    min-height: 120px;
    resize: vertical;
}

.divider{
    height: 1px;
    background: var(--border);
    margin:16px 0;
}

.muted{
    margin: 10px 0;
    color:var(--muted);
}

.formMessage {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.45;
}
.formMessage.success{
    color: #22c55e;
}

.formMessage.error{
    color: #ef4444;
}

.hp{
    display: none;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

#sendBtn{
    text-decoration: none;
    cursor: pointer;
    color:var(--text);
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(135deg, rgba(124, 92, 255, .95), rgba(51, 214, 255, .65));
    transition: .2s;
    font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
    font-weight: 400;
    font-style: normal;
    width: 100%;
}

#sendBtn:hover{
    transform: translateY(-1px);
    transition: all 0.2s;
    border: 1px solid var(--accent3);
}

#sendBtn:disabled{
    opacity: .5;
    cursor: not-allowed;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,.25);
    border-top-color: var(--accent2);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg);}
}

.contact-grid-bottom {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr);
  gap: 18px;
  align-items: start;
  width: 100%;
  margin-top: 20px;
}

.FAQ{
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 25px;
  padding: 15px 20px;
  width: 100%;
  height: 180px;
}

.FAQ p{
  font-size: 13px;
}

.FAQ h3{
  font-size: 15px;
}

.FAQ-txt{
  padding:10px 0;
}

.FAQ:hover{
  transform: translateY(-2px);
  
}

.faq {
  gap: 10px;
  padding: 0;
}

.FAQ-wrap strong{
  margin-bottom: 15px;
}

.faqQ{
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-style: normal;
  cursor: pointer;
}

.faqItem{
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 25px;
  /* width: 250px; */
  height: fit-content;
}

.Contactcard {
    width: 100%;
}

/* FAQ */
.faq{ display:grid; gap:20px; }

.faqItem {
  border-radius: 14px;
  border: 1px solid rgba(51, 214, 255, .14);
  background: rgba(255,255,255,.032);
}

.faqQ {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 15px;
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.35;
}

.faqA{
  max-height:0;
  overflow:hidden;
  transition: max-height 0.1s cubic-bezier(.08,.08,.71,.7), padding 0.1s cubic-bezier(.08,.08,.71,.7); 
  padding: 0 14px;
  will-change: grid-template-rows;
}
.faqItem.open .faqA{
  max-height: 220px;
  padding: 0 14px 14px;
}

 .faqItem.open{
    border: 1px solid var(--accent3);

}

.faqA-inner p {
  line-height: 1.6;
  font-size: 14.5px;
}



.FaqContainer,
.Contactcard {
  padding: 20px;
  height: 100%;
}

.FaqHead {
  margin-bottom: 16px;
}

.FaqHead h2 {
  font-size: 26px;
}

@media (max-width: 860px) {
  .contact-grid-bottom {
    grid-template-columns: 1fr;
  }

  .contactButton-wrap {
    flex-direction: column;
  }

  .contactButton-wrap .btn, .FaqContainer {
    width: 100%;
  }

}

/* ===============================
   10. Pacchetti
================================ */

#pacchetti .container > .muted {
  max-width: 62ch;
  line-height: 1.65;
}

#packagesGrid {
  align-items: stretch;
}


.packCard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  min-height: 100%;
}

.packCard h3 {
  font-size: 22px;
  margin-bottom: 0;
}

.price {
  margin: 0;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  color: var(--text);
}

.packCard > .muted {
  margin: 0;
  line-height: 1.55;
  font-size: 14.5px;
}

.packCard .list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 4px 0 6px;
  list-style: none;
}

.packCard .list li {
  position: relative;
  padding-left: 18px;
  color: rgba(234, 240, 255, .78);
  font-size: 14.5px;
  line-height: 1.45;
}

.packCard .list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent2);
  box-shadow: 0 0 12px rgba(51, 214, 255, .35);
}

.packCard .btn {
  width: 100%;
  margin-top: auto;
  min-height: 44px;
}

.packCard.featured,
.packCard.featured:hover {
  border-color: rgba(51, 214, 255, .42);
  background: linear-gradient(180deg, rgba(51,214,255,.075), rgba(255,255,255,.04));
  box-shadow: 0 26px 80px rgba(0,0,0,.30);
}


.packCard.featured::before {
  content: "Consigliato";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(51,214,255,.28);
  background: rgba(51,214,255,.10);
  color: rgba(234,240,255,.86);
  font-size: 12px;
  font-weight: 700;
}

/* ===============================
   11. Footer
================================ */

.footer{padding-bottom:20px;border-top:1px solid var(--line);}
.footerInner{display:grid;align-items:center;}

.footer-wrap{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top:20px;
  
}

.footer-wrap a{
  background: var(--card);
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--line);
  width: 160px;
}

.brand-footer{
  display: flex;
  justify-content: space-between;
}

.brandImg-footer{
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.brandWrap-Footer{
  display: flex;
  justify-content: center;
}

.brandImg-footer img{
  max-width: 200px;
  height: auto;
}

.nav-footer{
  padding-bottom:20px;
}

.nav-footer a{
  display: flex;
  justify-content: center;
  text-decoration: none;
}

.contactButtons-footer{
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap:20px;
  margin: 20px 0;
}

.contactButtons-footer a{
  background: var(--card) !important;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--line);
  width: 160px;
}

.footer-wrap strong{
  justify-content: center;
  display: flex;
}

.nav-toogle-footer{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
  justify-items: center
}

.container-toggle {
  display: none;
  cursor: pointer;

}

/* ===============================
   12. Animazioni / reveal
================================ */

@media (max-width: 860px){
  .brandDesk{ display:none; }
  .brandMobile{ display:flex; align-items:center; justify-content:center; width:46px !important; height:46px !important; }
  .brandMobile img{ max-width:46px !important; max-height:46px !important; width:auto; height:auto; object-fit:contain; }
  .nav-wrap{padding: 0 20px;}
}

@media (max-width: 860px){
  .navLinks{ display:none !important; }

  .nav-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background: transparent;
    border:none;
  }

  .container-toggle{display: inline-block;}

}

html, body{
  overflow-x: hidden;
}

.Reveal {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  backface-visibility: hidden; /* evita ricalcoli durante lo scroll */
}

.Reveal.show {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.RevealChild {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: var(--reveal-delay, 0ms); 
}

.RevealChild.showChild {
  opacity: 1;
  transform: translateY(0);
}

.Reveal, .RevealChild{
  overflow-anchor: none;
}

/* NAV reveal in sequenza */
.navLinks a{
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .45s ease, transform .45s ease, color .2s ease, box-shadow .2s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

/* quando il JS aggiunge showChild al singolo link */
.navLinks a.showChild{
  opacity: 1;
  transform: translateY(0);
}


html{
  overflow-y: scroll;     /* scrollbar sempre presente */
  overflow-x: hidden;
}

body{
  overflow-x: hidden;
}


/* Overlay (sfondo scuro) */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 9998;
  backdrop-filter: blur(2px);
}

.overlay.show{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Modal wrapper */
.modal{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;

  z-index: 15;

  backdrop-filter: blur(4px);
}

.modal.show{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Box */
.modalBox{
  position: relative; /* serve per posizionare la X di chiusura dentro */
  width: min(680px, 92vw);
  max-height: min(78vh, 640px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(8,12,18,.92);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  padding: 18px 18px 14px;
  transform: translateY(10px);
  transition: transform .25s ease;
  z-index: 20;
}

.modal.show .modalBox{
  transform: translateY(0);
}

/* Close button */
.modalClose{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border:1px solid var(--line);
  border-radius: 100vw;
  background: rgba(255,255,255,.04);
  box-shadow: 0 0 2px var(--text);
  color: #fff;
  font-size: 12px;

}

.modalAction{
  display: flex;
  gap:10px;
  justify-content: flex-end;
  margin-top: 14px;
}

#modalOk{
  color:var(--text)
}

.no-scroll {
  overflow: hidden;
}

.modalPopup, .contatti-popup{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(51,214,255,.65));
  text-decoration:none;
  font-weight:700;
  cursor: pointer;
  z-index: 10000 !important;
  color:var(--text);
}

.modalPopup:hover, .contatti-popup:hover{
    
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.overlay[hidden],
.modal[hidden]{
  display: none !important;
}

/* ===============================
   13. Responsive
================================ */

@media (max-width: 860px) {

  .packCard {
    padding: 20px;
  }

  .price {
    font-size: 32px;
  }
}

@media (min-width: 700px) and (max-width: 1020px) {
  #projectsGrid,
  #packagesGrid,
  .stepsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .heroGrid,
  .contact-grid-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 699px) {
  .container {
    width: min(100% - 28px, 1100px);
  }

  .section {
    padding: 42px 0;
  }

  h1 {
    font-size: 38px;
    line-height: 1.04;
  }

  h2 {
    font-size: 28px;
  }

  #projectsGrid,
  #packagesGrid,
  .stepsGrid,
  .contact-grid-bottom,
  .grid {
    grid-template-columns: 1fr;
  }

  .heroCta,
  .contactButton-wrap,
  .contactButtons-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .heroCta .btn,
  .contactButton-wrap .btn,
  .contactButtons-footer a,
  .FaqContainer {
    width: 100%;
  }

  .stepCard,
  .faqItem {
    width: 100%;
  }

  .stepCard {
    min-height: auto;
  }

  .footer-wrap {
  grid-template-columns: 1fr;
  gap: 26px;
  text-align: center;
}

.nav-footer,
.other-info {
  width: 100%;
}

.nav-toogle-footer {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: stretch;
}

.footer-wrap a,
.contactButtons-footer a {
  width: 100%;
  justify-content: center;
}

.contactButtons-footer {
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.brand-footer {
  justify-content: center;
  text-align: center;
}

.brandImg-footer img {
  width: 160px;
  height: auto;
}
}

.projectCard:hover,
.stepCard:hover,
.packCard:hover,
.noteBox:hover,
.projectCard.showChild:hover,
.stepCard.showChild:hover,
.packCard.showChild:hover,
.noteBox.showChild:hover{
  transform: translateY(-3px);
  border-color: rgba(51, 214, 255, .28);
  background: rgba(255,255,255,.055);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}

/* Bottoni: hover diverso dalle card, più pulito */
.btn {
  border: 1px solid rgba(51, 214, 255, .20);
  transition: transform .18s ease, border-color .18s ease, filter .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover,
.btn.showChild:hover,
.btn.RevealChild.showChild:hover,
.status:hover {
  transform: translateY(-2px);
  border-color: rgba(51, 214, 255, .38);
  filter: brightness(1.08) saturate(1.04);
  box-shadow: 0 14px 32px rgba(51, 214, 255, .14);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;

}

.btn.ghost:hover,
.btn.ghost.showChild:hover,
.btn.ghost.RevealChild.showChild:hover {
  background: rgba(255,255,255,.075);
  filter: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
  box-shadow: 0 14px 32px rgba(51, 214, 255, .14);

}

/* Footer: più rapido e senza cambio spessore bordo */
.footer-wrap a,
.contactButtons-footer a {
  border: 1px solid rgba(51, 214, 255, .20);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
  
}

.footer-wrap a:hover,
.contactButtons-footer a:hover {
  transform: translateY(-2px);
  border-color: rgba(51, 214, 255, .36);
  background: rgba(255,255,255,.055) !important;
  box-shadow: 0 14px 32px rgba(51, 214, 255, .14);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.stepCard.showChild,
.projectCard.showChild,
.packCard.showChild,
.noteBox.showChild {
  transition-delay: 0ms !important;
}

.stepCard,
.stepCard.showChild {
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease !important;
}

input,
textarea,
.customSelectBtn {
  background: rgba(255,255,255,.035);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
  font-family: inherit;
}

input:focus,
textarea:focus,
.customSelectBtn:focus,
.customSelectBtn.select-open {
  border: 1px solid var(--accent3);
  background: rgba(255,255,255,.055);
}

/* ===============================
   14. Pagina legale (privacy)
================================ */

.legal{
  padding-top: 130px;
}

.legalContent{
  max-width: 720px;
}

.legalContent h1{
  margin-bottom: 4px;
}

.legalContent h2{
  margin-top: 28px;
  font-size: 19px;
}

.legalContent p{
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0 0;
}

.legalContent a{
  color: var(--accent4);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}