/* ==========================================================
   ValsaTech, identità "Linea di cresta"
   Fondo scuro non nero, crema per i testi, ciano come firma.
   Un solo segno grafico: il profilo spezzato dei calanchi.
   ========================================================== */

/* --- Font locali (nessuna chiamata a Google) --- */
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../assets/fonts/Orbitron.woff2') format('woff2');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../assets/fonts/PlusJakartaSans.woff2') format('woff2');
}

/* --- Token --- */
:root {
  --bg: #0f1115;
  --bg-deep: #0a0a0f;
  --surface: #151820;
  --surface-2: #1b1f29;
  --text: #f3efe6;
  --text-2: #b4b8bf;
  --muted: #939aa3;
  --line: rgba(243, 239, 230, 0.12);
  --line-strong: rgba(243, 239, 230, 0.22);
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.14);
  --accent-deep: #0a7fae;
  --font-display: 'Orbitron', 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, 'Liberation Mono', monospace;
  --wrap: 1360px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section: clamp(6rem, 12vw, 10rem);
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-mask: cubic-bezier(0.77, 0, 0.18, 1);
}

/* --- Reset e base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 212, 255, 0.16);
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

figure {
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* --- Motion: si accende solo se l'utente non ha chiesto meno movimento --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Tipografia di sezione --- */
.eyebrow,
.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.eyebrow-light {
  color: var(--accent);
}

.section-title {
  font-family: var(--font-body);
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.4rem;
  text-wrap: balance;
}

.section-lead,
.section-subtitle {
  font-size: 1.12rem;
  color: var(--text-2);
  max-width: 60ch;
  line-height: 1.7;
}

.section-subtitle.centered {
  margin: 0 auto;
}

.section-head {
  max-width: 820px;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-head-light .section-title {
  color: #ffffff;
}

.text-center {
  text-align: center;
  margin-bottom: 48px;
}

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

/* --- Comparsa allo scroll: il contenuto è visibile senza JS --- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --- Foto che si aprono con la maschera --- */
.js .reveal-img {
  overflow: hidden;
}

.js .reveal-img img {
  clip-path: inset(0 0 100% 0);
  transform: scale(1.12);
  transition: clip-path 1.1s var(--ease-mask), transform 1.6s var(--ease-out);
}

.js .reveal-img.visible img {
  clip-path: inset(0);
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal-img img {
    clip-path: none;
    transform: none;
  }
}

/* --- Solo per gli screen reader --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Titoli che entrano parola per parola --- */
[data-split] .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

[data-split] .w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 60ms);
}

[data-split].visible .w > span {
  transform: none;
}

/* --- Grana di pellicola sulle fasce scure (statica, costa zero) --- */
.dark-band {
  position: relative;
  isolation: isolate;
}

.dark-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}

/* --- Barra di avanzamento e sentinella per il menu --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1002;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: grow linear both;
    animation-timeline: scroll();
  }
}

@keyframes grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.top-sentinel {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
}

/* ==========================================================
   NAVBAR
   ========================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  color: #ffffff;
  transition: background 0.4s ease, box-shadow 0.4s ease, height 0.4s ease;
}

.navbar.scrolled {
  height: 62px;
  background: rgba(15, 17, 21, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.navbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 2px;
  white-space: nowrap;
  min-height: 44px;
}

.logo-mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-2);
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.nav-links a.active {
  color: #ffffff;
}

.nav-links a.active::after {
  transform: scaleX(1);
}

@media (hover: hover) {
  .nav-links a:hover {
    color: #ffffff;
  }

  .nav-links a:hover::after {
    transform: scaleX(1);
  }
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

@media (hover: hover) {
  .nav-cta:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-deep);
  }
}

.nav-cta:active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-deep);
}

.nav-cta-icon {
  font-size: 1rem;
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  color: inherit;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Menu mobile */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg-deep);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: calc(var(--nav-h) + 12px) var(--gutter) 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

/* voci al centro quando c'è spazio, scorrevoli quando lo schermo è basso */
.mobile-menu > :first-child {
  margin-top: auto;
}

.mobile-menu > :last-child {
  margin-bottom: auto;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s;
}

.mobile-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 4px 20px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}

.mobile-menu a.active {
  color: var(--accent);
}

.mobile-menu-phone {
  margin-top: 12px;
  font-family: var(--font-mono) !important;
  font-size: 1.1rem !important;
  color: var(--accent) !important;
  letter-spacing: 0.06em;
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  max-height: 1000px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-deep);
  color: #ffffff;
}

.hero-photo,
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-photo img {
  object-fit: cover;
  object-position: center 40%;
  transform-origin: 50% 40%;
}

/* Zoom lento, quasi impercettibile, appena si apre la pagina */
@media (prefers-reduced-motion: no-preference) {
  .hero-photo img {
    animation: kenburns 26s ease-out both;
    will-change: transform;
  }
}

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08) translateY(-1.5%); }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 15, 0.5) 0%, rgba(10, 10, 15, 0.08) 26%, rgba(10, 10, 15, 0.5) 52%, rgba(10, 10, 15, 0.95) 100%),
    linear-gradient(90deg, rgba(10, 10, 15, 0.7) 0%, rgba(10, 10, 15, 0.25) 45%, rgba(10, 10, 15, 0) 75%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7.2vw, 6.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: #ffffff;
  max-width: 14ch;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

/* La firma: la linea di cresta si disegna sotto il titolo */
.hero-cresta {
  width: min(520px, 70%);
  height: 44px;
  margin: 1.2rem 0 2rem;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.45));
}

.hero-cresta use {
  vector-effect: non-scaling-stroke;
}

/* Si rivela da sinistra a destra, come se venisse tracciata */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-cresta {
    clip-path: inset(0 100% 0 0);
    animation: draw 1.6s var(--ease-mask) 0.9s forwards;
  }
}

@keyframes draw {
  to { clip-path: inset(0 0 0 0); }
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
  max-width: 54ch;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 28px;
  z-index: 1;
  width: 28px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.hero-scroll span {
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-scroll span {
    animation: scroll-hint 2s ease-in-out infinite;
  }
}

@keyframes scroll-hint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(16px); opacity: 0; }
}

/* ==========================================================
   PULSANTI
   ========================================================== */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Riempimento che sale come un liquido */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateY(101%);
  transition: transform 0.4s var(--ease-out);
}

.btn:focus-visible::before {
  transform: translateY(0);
}

@media (hover: hover) {
  .btn:hover::before {
    transform: translateY(0);
  }
}

/* sul telefono il colore sale solo mentre il dito preme */
@media (hover: none) {
  .btn:active::before {
    transform: translateY(0);
    transition-duration: 0.15s;
  }
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.28);
}

.btn-primary::before {
  background: #ffffff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.btn-ghost::before {
  background: #ffffff;
}

.btn-ghost:focus-visible {
  color: var(--bg-deep);
  border-color: #ffffff;
}

@media (hover: hover) {
  .btn-ghost:hover {
    color: var(--bg-deep);
    border-color: #ffffff;
  }
}

@media (hover: none) {
  .btn-ghost:active {
    color: var(--bg-deep);
    border-color: #ffffff;
  }
}

.btn-whatsapp {
  background: #25d366;
  color: #062b14;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp::before {
  background: #ffffff;
}

.btn-call {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-call::before {
  background: var(--accent);
}

@media (hover: hover) {
  .btn-call:hover {
    color: var(--bg-deep);
  }
}

@media (hover: none) {
  .btn-call:active {
    color: var(--bg-deep);
  }
}

.btn-magnet {
  transition: transform 0.25s var(--ease-out), color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ==========================================================
   MARQUEE DEI PAESI
   ========================================================== */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  padding: 1.1rem 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}

.marquee-track li {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  white-space: nowrap;
}

.marquee-track li::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

@media (prefers-reduced-motion: no-preference) {
  .marquee-track {
    animation: marquee 55s linear infinite;
  }

  .marquee:focus-within .marquee-track {
    animation-play-state: paused;
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .marquee:hover .marquee-track {
    animation-play-state: paused;
  }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { mask-image: none; -webkit-mask-image: none; }
  .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; padding-inline: var(--gutter); }
}

/* ==========================================================
   01 SERVIZI: foto e indice a righe
   ========================================================== */
.servizi {
  padding-block: var(--section) calc(var(--section) * 0.6);
  background: var(--bg);
}

.area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.area > * {
  min-width: 0;
}

.area-inversa .area-photo {
  order: 2;
}

.area-photo {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.area-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nota-ai {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(10, 10, 15, 0.82);
  color: #f3efe6;
  font-size: 0.75rem;
  line-height: 1.4;
}

.area-photo-alta img {
  object-position: center 30%;
}

.area-title {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.area-intro {
  color: var(--text-2);
  font-size: 1.05rem;
  margin-bottom: 1.8rem;
}

.index li {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 0.6rem 1rem;
  padding: 1.3rem 0.6rem;
  margin-inline: -0.6rem;
  border-top: 1px solid var(--line);
  border-radius: 6px;
  transition: background 0.3s ease;
}

.index li:last-child {
  border-bottom: 1px solid var(--line);
}

@media (hover: hover) {
  .index li:hover {
    background: var(--surface);
  }
}

.index-n {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 0.35rem;
}

.index strong {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.index span {
  font-size: 0.97rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* ==========================================================
   FASCE SU FOTO (Dove e come, chiamata finale)
   ========================================================== */
.band {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: var(--bg-deep);
  padding-block: var(--section);
}

.band-img {
  position: absolute;
  left: 0;
  top: -12%;
  width: 100%;
  height: 124%;
  object-fit: cover;
  z-index: 0;
}

/* Parallasse leggera gestita dal browser, zero JavaScript */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .band-img {
      animation: band-parallax linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
  }
}

@keyframes band-parallax {
  from { transform: translateY(-6%); }
  to { transform: translateY(6%); }
}

.band-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.82), rgba(10, 10, 15, 0.62) 50%, rgba(10, 10, 15, 0.86));
}

.band-shade-forte {
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.7), rgba(10, 10, 15, 0.78));
}

.band-inner {
  position: relative;
  z-index: 2;
}

.band .section-lead {
  color: rgba(255, 255, 255, 0.82);
}

.modalita-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  overflow: hidden;
}

.modalita-card {
  padding: clamp(1.8rem, 3vw, 2.6rem);
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cresta-dot {
  width: 30px;
  height: 30px;
  color: var(--accent);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.modalita-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.modalita-card p {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

/* ==========================================================
   03 PREZZI: numeri grandi, niente card
   ========================================================== */
.prezzi {
  padding-block: var(--section);
  background: var(--bg);
}

.prezzi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.prezzo {
  padding: clamp(1.8rem, 3vw, 2.6rem) clamp(1.2rem, 2vw, 2rem) clamp(1.8rem, 3vw, 2.6rem) 0;
  border-right: 1px solid var(--line);
  margin-right: clamp(1.2rem, 2vw, 2rem);
}

.prezzo:last-child {
  border-right: none;
  margin-right: 0;
}

.prezzo-nome {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.prezzo-valore {
  font-size: clamp(3rem, 5.5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.prezzo-da,
.prezzo-unita {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-2);
}

.prezzo-euro {
  font-size: 1.6rem;
  color: var(--accent);
}

.prezzo-testo {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.7;
}

.prezzi-nota {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ==========================================================
   04 COME FUNZIONA: la cresta collega i quattro passi
   ========================================================== */
.processo {
  padding-block: var(--section);
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
}

.timeline-wrap {
  position: relative;
}

.timeline-line {
  position: absolute;
  left: 4%;
  right: 4%;
  top: -6px;
  width: 92%;
  height: 60px;
  color: var(--accent);
  opacity: 0.9;
}

.timeline-line use {
  vector-effect: non-scaling-stroke;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .timeline-line {
      clip-path: inset(0 100% 0 0);
      animation: draw linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 55%;
    }
  }
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  padding-top: 70px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  background: var(--bg-deep);
}

.timeline-step h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.timeline-step p {
  font-size: 0.96rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* ==========================================================
   05 CHI SIAMO
   ========================================================== */
.chi-siamo {
  padding-block: var(--section);
  background: var(--bg);
}

.chi-siamo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.chi-siamo-grid > * {
  min-width: 0;
}

.chi-siamo-photo {
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.chi-siamo-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chi-siamo-text p {
  margin-bottom: 1.1rem;
  font-size: 1.08rem;
  color: var(--text-2);
  line-height: 1.75;
}

.chi-siamo-text p strong {
  color: var(--text);
}

.punti {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.punti li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
  color: var(--text-2);
  line-height: 1.65;
}

.punti .cresta-dot {
  width: 24px;
  height: 24px;
  margin: 0.1rem 0 0;
}

.punti strong {
  color: var(--text);
}

/* ==========================================================
   CHIAMATA FINALE
   ========================================================== */
.cta-inner {
  text-align: center;
}

.cta-title {
  font-family: var(--font-body);
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin: 0 auto 1.4rem;
  text-wrap: balance;
}

.cta-inner .section-lead {
  margin: 0 auto 2.2rem;
}

.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================
   06 CONTATTI
   ========================================================== */
.contatti {
  padding-block: var(--section);
  background: var(--bg);
}

.contatti-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.contatti-grid > * {
  min-width: 0;
}

.contatti-list {
  border-top: 1px solid var(--line);
}

.contatti-list li {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
  line-height: 1.5;
}

.contatti-k {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.3rem;
}

.contatti-list small {
  color: var(--muted);
  font-size: 0.85rem;
}

.contatti-list a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

@media (hover: hover) {
  .contatti-list a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
  }
}

/* Modulo */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.5rem, 3vw, 2.4rem);
}

.contact-form h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
}

.hidden-field {
  display: none;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 8px;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.form-check label {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.5;
  cursor: pointer;
}

.form-check label a {
  color: var(--accent);
  text-decoration: underline;
}

.btn-submit {
  width: 100%;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  background: var(--bg-deep);
  color: var(--text-2);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.footer-cresta {
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.footer-cresta svg {
  width: 100%;
  height: 60px;
}

.footer-cresta use {
  vector-effect: non-scaling-stroke;
}

.footer-paesi {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 2%;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 13vw, 12rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 1.5rem 0 2.5rem;
  white-space: nowrap;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.footer-claim {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.93rem;
  line-height: 1.7;
  max-width: 340px;
}

.footer-links h3,
.footer-contact h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 18px;
}

.footer-links li {
  margin-bottom: 9px;
}

.footer-links a,
.footer-contact a {
  font-size: 0.93rem;
  color: var(--text-2);
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .footer-links a:hover,
  .footer-contact a:hover {
    color: var(--accent);
  }
}

.footer-contact p {
  font-size: 0.93rem;
  margin-bottom: 9px;
  line-height: 1.6;
}

.footer-bottom {
  padding-top: 24px;
}

.footer-legal {
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 820px;
}

.footer-legal a {
  color: var(--text-2);
  text-decoration: underline;
}

@media (hover: hover) {
  .footer-legal a:hover {
    color: var(--accent);
  }
}

.segnaposto {
  color: var(--text-2);
  font-style: italic;
}

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

@media (hover: hover) {
  .wa-float:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 34px rgba(37, 211, 102, 0.55);
  }
}

.wa-float:active {
  transform: scale(0.94);
}

/* ==========================================================
   PAGINE SECONDARIE: grazie e legali
   ========================================================== */
.grazie {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  background: var(--bg);
}

.grazie-box {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 56px 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.grazie-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-deep);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.grazie-box .section-subtitle {
  margin-bottom: 32px;
}

.grazie-back {
  display: inline-block;
  margin-top: 28px;
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .grazie-back:hover {
    color: var(--accent);
  }
}

.legale {
  padding: calc(var(--nav-h) + 56px) 0 90px;
  background: var(--bg);
}

.legale-box {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 48px 48px 40px;
}

.legale-box .section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
}

.legale-box .aggiornamento {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 32px;
}

.legale-box h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin: 34px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.legale-box h3 {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
  margin: 20px 0 8px;
}

.legale-box p,
.legale-box li {
  font-size: 0.98rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 12px;
}

.legale-box ul {
  list-style: disc;
  padding-left: 22px;
}

.legale-box li {
  margin-bottom: 6px;
}

.legale-box a {
  color: var(--accent);
  text-decoration: underline;
}

.legale-box table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  margin: 12px 0 18px;
}

.legale-box th,
.legale-box td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--text-2);
}

.legale-box th {
  color: var(--text);
  font-weight: 700;
  background: var(--bg-deep);
}

.legale-box .table-wrap {
  overflow-x: auto;
}

/* Pagine secondarie: navbar sempre compatta, contenitore classico */
.navbar.scrolled .container,
.container {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .burger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .hero-row {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .area {
    grid-template-columns: 1fr;
  }

  .area-inversa .area-photo {
    order: 0;
  }

  .area-photo {
    position: relative;
    top: auto;
    max-width: 640px;
  }

  .modalita-grid {
    grid-template-columns: 1fr;
  }

  .prezzi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: none;
  }

  .prezzo {
    border-bottom: 1px solid var(--line);
  }

  .prezzo:nth-child(2n) {
    border-right: none;
    margin-right: 0;
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 0;
    row-gap: 2.5rem;
  }

  .timeline-line {
    display: none;
  }

  .chi-siamo-grid,
  .contatti-grid {
    grid-template-columns: 1fr;
  }

  .chi-siamo-photo {
    aspect-ratio: 4 / 3;
    max-width: 640px;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  .nav-cta {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .nav-cta-text {
    display: none;
  }

  .hero {
    height: auto;
    min-height: 92svh;
    max-height: none;
  }

  .hero-photo img {
    object-position: center 50%;
  }

  .hero-title {
    max-width: 100%;
  }

  .hero-cresta {
    width: 80%;
    height: 36px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .hero-scroll {
    display: none;
  }

  .index li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .index-n {
    padding-top: 0;
  }

  .prezzi-grid {
    grid-template-columns: 1fr;
  }

  .prezzo {
    border-right: none;
    margin-right: 0;
    padding-inline: 0;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 340px;
  }

  .contatti-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-paesi {
    display: none;
  }

  .footer-cresta svg {
    height: 40px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .wa-float {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }

  .grazie-box,
  .legale-box {
    padding: 32px 22px;
  }
}

/* Schermi bassi (telefono girato): menu su due colonne, senza scorrere */
@media (max-width: 1024px) and (max-height: 560px) {
  .mobile-menu {
    gap: 0;
    padding-top: calc(var(--nav-h) + 4px);
    padding-bottom: 12px;
  }

  .mobile-menu a {
    min-height: 44px;
    font-size: 1.25rem;
  }

  .mobile-menu-phone {
    margin-top: 4px;
  }
}

@media (max-width: 1024px) and (max-height: 560px) and (min-aspect-ratio: 105/100) {
  .mobile-menu {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    align-content: center;
    justify-items: center;
    column-gap: 48px;
  }

  .mobile-menu > :first-child,
  .mobile-menu > :last-child {
    margin: 0;
  }

  .mobile-menu-phone {
    grid-column: 1 / -1;
  }
}

/* Tocchi col dito: collegamenti alti almeno 44 punti */
@media (pointer: coarse) {
  .contatti-list a {
    display: inline-block;
    padding: 10px 0;
    margin: -10px 0;
  }

  .footer-links li {
    margin-bottom: 0;
  }

  .footer-links a,
  .footer-contact a {
    display: inline-block;
    min-width: 44px;
    padding: 11px 0;
  }

  .nav-links a {
    display: inline-block;
    min-width: 44px;
    padding: 13px 0;
    text-align: center;
  }

  .nav-links a::after {
    bottom: 7px;
  }

  .form-check label {
    padding: 2px 0;
  }

  .footer-contact p {
    margin-bottom: 0;
  }

  .footer-contact p:first-of-type {
    margin-bottom: 6px;
  }

  .footer-legal a[href$=".html"] {
    display: inline-block;
    padding: 12px 2px;
  }

  .form-check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 1px;
  }

  .grazie-back {
    padding: 10px 0;
  }
}

/* Focus visibile per la tastiera */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
