﻿/* ═══════════════════════════════════════════════════
   Casa Asiago — Custom stylesheet
   Tailwind CDN gestisce le utility class.
   Questo file contiene: variabili, componenti custom,
   animazioni, layout specifici.
═══════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────── */
:root {
  --cream:      #F5F0E8;
  --ink:        #1A1A18;
  --muted:      #6B6560;
  --pine:       #1A3A2B;
  --pine-deep:  #0F2419;
  --pine-mid:   #2D5F4D;
  --pine-light: #EAF1EC;
  --stone:      #8B6F47;
  --stone-lt:   #B89A78;
  --rule:       #DDD5C8;
  --ease-out:   cubic-bezier(.32,.72,0,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--pine); color: #fff; }

/* ── Film-grain overlay (Editorial Luxury vibe) ── */
.grain-overlay {
  position: fixed; inset: 0; z-index: 999;
  pointer-events: none; user-select: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.028;
  mix-blend-mode: multiply;
}

/* ── Display typography ─────────────────────────── */
.fd {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}
.fd em, .fd .ac {
  font-style: italic;
  color: var(--pine);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.fn {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-feature-settings: "lnum";
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  letter-spacing: -0.04em;
}
.eyebrow {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--stone); gap: 6px;
}
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(139,111,71,0.10); color: var(--stone);
  border: 1px solid rgba(139,111,71,0.22);
  border-radius: 999px; padding: 6px 14px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
}

/* ── Type scale ─────────────────────────────────── */
.h-hero    { font-size: clamp(2.3rem,4.4vw,5.2rem);  line-height: 1.04; letter-spacing: -0.035em; text-wrap: pretty; font-weight: 500; }
.h-section { font-size: clamp(1.85rem,3.3vw,3.6rem); line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.h-card    { font-size: clamp(1.25rem,1.7vw,1.8rem);  line-height: 1.17; letter-spacing: -0.015em; text-wrap: balance; }
.lede      { font-size: clamp(1.0rem,1.15vw,1.18rem); line-height: 1.70; color: var(--muted); text-wrap: pretty; }
.small     { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* ── FLOATING PILL NAV ──────────────────────────── */
.nav-pill {
  position: fixed; top: 0; left: 0; right: 0;
  width: 100%; max-width: none;
  transform: none;
  z-index: 100; border-radius: 0;
  padding: 18px 32px;
  transition: background var(--ease-out) .32s,
              box-shadow var(--ease-out) .32s,
              backdrop-filter var(--ease-out) .32s,
              padding var(--ease-out) .32s;
  background: transparent;
  border: none; box-shadow: none;
}
.nav-pill.scrolled {
  padding: 12px 32px;
  background: rgba(245,240,232,0.94);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px 0 rgba(221,213,200,.9),
              0 6px 32px -10px rgba(0,0,0,.08);
}
@media (max-width: 640px) {
  .nav-pill { padding: 14px 20px; }
  .nav-pill.scrolled { padding: 10px 20px; }
}

/* ── MOBILE MENU OVERLAY ────────────────────────── */
.mob-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15,36,25,0.97);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column;
  justify-content: center; padding: 48px 36px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--ease-out) .3s, visibility .3s;
}
.mob-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }

.mob-nav-link {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500; font-style: italic;
  font-size: clamp(2.4rem,7vw,3.6rem);
  line-height: 1.1; color: #fff;
  opacity: 0; transform: translateY(32px);
  transition: opacity var(--ease-out) .5s,
              transform var(--ease-out) .5s,
              color .2s;
}
.mob-overlay.open .mob-nav-link:nth-child(1) { opacity:1; transform:none; transition-delay:.06s; }
.mob-overlay.open .mob-nav-link:nth-child(2) { opacity:1; transform:none; transition-delay:.12s; }
.mob-overlay.open .mob-nav-link:nth-child(3) { opacity:1; transform:none; transition-delay:.18s; }
.mob-overlay.open .mob-nav-link:nth-child(4) { opacity:1; transform:none; transition-delay:.24s; }
.mob-overlay.open .mob-cta-link             { opacity:1; transform:none; transition-delay:.30s; }
.mob-cta-link {
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--ease-out) .5s, transform var(--ease-out) .5s;
  margin-top: 40px;
}
.mob-nav-link:hover { color: var(--stone-lt); }

/* ── Hamburger morph ────────────────────────────── */
.ham {
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 11px;
}
.ham-line {
  width: 22px; height: 1.5px; background: var(--ink);
  border-radius: 2px; transform-origin: center;
  transition: transform var(--ease-out) .3s, opacity .2s, background .2s;
}
.ham.open .ham-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg);  background: #fff; }
.ham.open .ham-line:nth-child(2) { opacity: 0; }
.ham.open .ham-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: #fff; }

/* ── BUTTONS — button-in-button pattern ─────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0;
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 14px;
  border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: background var(--ease-out) .25s,
              transform var(--ease-out) .25s,
              box-shadow var(--ease-out) .25s,
              color .2s;
  touch-action: manipulation; overflow: hidden;
}
.btn-pine {
  background: var(--pine); color: #fff;
  padding: 10px 10px 10px 22px;
  box-shadow: 0 8px 24px -8px rgba(26,58,43,0.42);
}
.btn-pine:hover  { background: var(--pine-deep); transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(26,58,43,0.52); }
.btn-pine:active { transform: scale(.98) translateY(0); }
.btn-arrow {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.15); margin-left: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--ease-spring) .3s,
              background var(--ease-out) .25s;
  font-size: 15px; line-height: 1;
}
.btn-pine:hover .btn-arrow  { transform: translate(2px,-1px) scale(1.08); background: rgba(255,255,255,0.22); }
.btn-stone:hover .btn-arrow { transform: translate(2px,-1px) scale(1.08); background: rgba(255,255,255,0.22); }
.btn-outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--rule); padding: 11px 22px;
  border-radius: 999px;
}
.btn-outline:hover { border-color: var(--pine); color: var(--pine); transform: translateY(-1px); }
.btn-stone {
  background: var(--stone); color: #fff;
  padding: 13px 13px 13px 24px;
  box-shadow: 0 10px 28px -8px rgba(139,111,71,0.46);
}
.btn-stone:hover  { background: #7a6240; transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(139,111,71,0.55); }
.btn-stone:active { transform: scale(.98) translateY(0); }
.btn-ghost {
  background: rgba(255,255,255,0.09); color: #fff;
  border: 1.5px solid rgba(255,255,255,0.20);
  padding: 11px 22px; border-radius: 999px;
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }

/* ── DOUBLE-BEZEL CARD ──────────────────────────── */
.db {
  border-radius: 2rem;
  background: rgba(26,26,24,0.03);
  border: 1px solid rgba(26,26,24,0.07);
  padding: 5px;
}
.db-inner {
  background: #fff;
  border-radius: calc(2rem - 5px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.80),
              0 1px 2px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: transform var(--ease-out) .35s,
              box-shadow var(--ease-out) .35s;
}
.db:hover .db-inner {
  transform: translateY(-4px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.80),
              0 20px 44px -14px rgba(0,0,0,.09);
}
.db-pine { border-color: rgba(26,58,43,0.20); background: rgba(26,58,43,0.06); }
.db-pine .db-inner { background: var(--pine); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.db-pine:hover .db-inner { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 22px 48px -16px rgba(26,58,43,.38); }

/* ── Underline link ─────────────────────────────── */
.ul { position: relative; padding-bottom: 2px; }
.ul::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 1.5px; width: 100%; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--ease-out) .35s;
}
.ul:hover::after, .ul:focus-visible::after { transform: scaleX(1); }

/* ── Tick list ──────────────────────────────────── */
.tl { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 15px; }
.tl::before {
  content: ""; flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='10' fill='%231A3A2B' opacity='0.13'/%3E%3Cpath d='M7.5 12.5L10.5 15.5L16.5 9' stroke='%231A3A2B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}

/* ── Infinite marquee ───────────────────────────── */
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mq-track { animation: mq 38s linear infinite; display: flex; width: max-content; will-change: transform; }
.mq-track:hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .mq-track { animation: none; } }

/* ── Trust bar ──────────────────────────────────── */
.trust-bar {
  background: #fff;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink);
  white-space: nowrap;
}
.trust-item .stars { color: #F5A623; letter-spacing: 1px; }

/* ── Process timeline ───────────────────────────── */
.proc-list { position: relative; }
.proc-list::before {
  content: ""; position: absolute; left: 22px; top: 26px; bottom: 26px;
  width: 2px;
  background: linear-gradient(to bottom, var(--pine) 0%, rgba(26,58,43,.06) 100%);
}
.proc-dot {
  flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--pine);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 500; font-size: 13px;
  color: var(--pine); margin-top: 2px;
  position: relative; z-index: 1;
}
.proc-dot.alt    { border-color: var(--stone); color: var(--stone); border-style: dashed; }
.proc-dot.active { background: var(--pine); color: #fff; border-color: var(--pine); }

/* ── Step finale (05) ───────────────────────────── */
.proc-step-final { list-style: none; }
.proc-final-wrap {
  display: flex; align-items: flex-start; gap: 20px;
  background: var(--pine);
  border-radius: 24px;
  padding: 26px 26px 28px 22px;
  box-shadow: 0 16px 48px -14px rgba(15,36,25,.35);
}
.proc-dot-final {
  flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px; position: relative; z-index: 1;
  transition: background .5s ease, border-color .5s ease,
              box-shadow .4s ease, transform .4s cubic-bezier(.16,1,.3,1);
}
/* Animate final dot when lit */
#proc-steps > li.proc-step-final:not(.lit) .proc-dot-final {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
}
#proc-steps > li.proc-step-final.lit .proc-dot-final {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.55);
  animation: stepDotPop .7s cubic-bezier(.16,1,.3,1) forwards;
}
/* Final step title always white — skip muted state */
#proc-steps > li.proc-step-final h3,
#proc-steps > li.proc-step-final:not(.lit) h3 { color: #fff !important; }
/* Feature pills */
.proc-final-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  color: rgba(255,255,255,.80);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 4px 11px 4px 9px;
  white-space: nowrap;
}
/* Button on dark background */
.btn-final {
  background: rgba(255,255,255,.95);
  color: var(--pine);
  padding: 11px 11px 11px 22px;
  font-size: 14px;
  box-shadow: 0 8px 28px -8px rgba(0,0,0,.28);
}
.btn-final .btn-arrow { background: var(--pine); color: #fff; }
.btn-final:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 14px 36px -10px rgba(0,0,0,.36); }
.btn-final:active { transform: scale(.98) translateY(0); }
.btn-final:hover .btn-arrow { transform: translate(2px,-1px) scale(1.08); }
/* Mobile */
@media (max-width: 480px) {
  .proc-final-wrap { padding: 20px 18px 22px 16px; gap: 14px; }
  .proc-dot-final { width: 38px; height: 38px; }
}

/* ── Step illuminate on scroll ──────────────────── */
#proc-steps > li:not(.lit) .proc-dot {
  background: var(--cream);
  color: rgba(26,58,43,.28);
  border-color: rgba(26,58,43,.20);
  transition: background .5s ease, color .5s ease, border-color .5s ease,
              box-shadow .4s ease, transform .4s cubic-bezier(.16,1,.3,1);
}
#proc-steps > li.lit .proc-dot {
  background: var(--pine);
  color: #fff;
  border-color: var(--pine);
  animation: stepDotPop .7s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes stepDotPop {
  0%   { transform: scale(.80); box-shadow: 0 0 0 0   rgba(26,58,43,.45); }
  55%  { transform: scale(1.12); box-shadow: 0 0 0 12px rgba(26,58,43,.0); }
  100% { transform: scale(1);   box-shadow: 0 0 0 5px  rgba(26,58,43,.09); }
}
#proc-steps > li:not(.lit) h3 {
  color: var(--muted);
  transition: color .45s ease .1s;
}
#proc-steps > li.lit h3 { color: var(--ink); }

/* ── Step opzionale (02) ────────────────────────── */
.proc-step-opt {
  background: rgba(139,111,71,.06);
  border: 1px dashed rgba(139,111,71,.28);
  border-radius: 18px;
  padding: 18px 20px 18px 0;
  margin-left: -20px;
  padding-left: 20px;
}
.proc-step-opt .proc-dot { background: rgba(243,237,227,.8); }
.proc-step-opt h3  { color: var(--muted) !important; }
.proc-step-opt > div > p { opacity: .85; }

/* ── Before/After interactive slider ────────────── */
.ba-wrap { position: relative; overflow: hidden; border-radius: 20px; background: #c5bdb4; touch-action: pan-y; }
.ba-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.ba-layer { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); transition: clip-path .02s linear; }
.ba-layer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-handle {
  position: absolute; top: 0; left: 50%; bottom: 0;
  width: 2px; background: rgba(255,255,255,0.85);
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  cursor: ew-resize; z-index: 3;
}
.ba-knob {
  width: 42px; height: 42px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.28); flex-shrink: 0;
}
.ba-lbl {
  position: absolute; z-index: 4; bottom: 12px; left: 12px;
  background: rgba(26,26,24,.70); color: #fff;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; font-weight: 700; pointer-events: none;
}
.ba-lbl-r { left: auto; right: 12px; }
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; z-index: 5;
  -webkit-appearance: none; margin: 0;
}

/* ── Gallery hover ──────────────────────────────── */
.gal-img { overflow: hidden; border-radius: 20px; }
.gal-img img { width: 100%; object-fit: cover; transition: transform var(--ease-out) .65s; }
.gal-img:hover img { transform: scale(1.05); }

/* ── FAQ accordion ──────────────────────────────── */
details.acc { border-bottom: 1px solid var(--rule); }
details.acc summary {
  list-style: none; cursor: pointer; padding: 26px 0;
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 24px;
}
details.acc summary::-webkit-details-marker { display: none; }
.acc-ico {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--pine-light); position: relative;
  transition: background .2s, transform var(--ease-out) .3s;
}
details.acc[open] .acc-ico { background: var(--pine); transform: rotate(135deg); }
.acc-ico::before, .acc-ico::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: var(--pine); border-radius: 1px; transition: background .2s;
}
details.acc[open] .acc-ico::before,
details.acc[open] .acc-ico::after { background: #fff; }
.acc-ico::before { width: 12px; height: 2px; transform: translate(-50%,-50%); }
.acc-ico::after  { width: 2px; height: 12px; transform: translate(-50%,-50%); }
.acc-body { padding: 0 0 26px; max-width: 740px; color: var(--muted); font-size: 16px; line-height: 1.65; }

/* ── Form dark (section contatti) ───────────────── */
.ff {
  width: 100%; padding: 13px 18px;
  background: rgba(255,255,255,.07); color: #fff;
  border: 1.5px solid rgba(255,255,255,.14); border-radius: 14px;
  font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 400;
  transition: border-color var(--ease-out) .2s,
              box-shadow var(--ease-out) .2s;
  outline: none; -webkit-appearance: none;
}
.ff:focus { border-color: rgba(255,255,255,.46); box-shadow: 0 0 0 4px rgba(255,255,255,.05); }
.ff::placeholder { color: rgba(255,255,255,.30); }
.ff-lbl {
  display: block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: rgba(255,255,255,.72); margin-bottom: 7px;
}
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 500; user-select: none;
  border: 1.5px solid rgba(255,255,255,.17);
  color: rgba(255,255,255,.52); background: transparent;
  transition: all var(--ease-out) .2s; min-height: 38px;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip.on, .chip:has(input:checked) {
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.38); color: #fff;
}
.chip:hover { border-color: rgba(255,255,255,.32); color: rgba(255,255,255,.80); }

/* ── Scroll reveal ──────────────────────────────── */
.rv {
  opacity: 0; transform: translateY(28px);
  transition: opacity .72s var(--ease-out), transform .72s var(--ease-out);
}
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Watermark ──────────────────────────────────── */
.wm {
  font-family: 'Fraunces', serif; font-weight: 700;
  color: transparent; pointer-events: none; user-select: none;
  -webkit-text-stroke: 1.5px rgba(26,58,43,.07);
  letter-spacing: -.07em; line-height: .78;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}

/* ── Misc helpers ───────────────────────────────── */
.hr      { height: 1px; background: var(--rule); border: 0; }
.hr-dark { height: 1px; background: rgba(255,255,255,.09); border: 0; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--pine); outline-offset: 3px; border-radius: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .7s linear infinite; display: inline-block; }
.sw { display: inline; }

/* padding-bottom rimosso: la bottom bar è stata sostituita con FAB flottanti */

/* ── Floating mobile CTA bar ────────────────────── */
/* Floating action buttons (mobile) */
.mob-cta-bar {
  position: fixed;
  right: 16px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .25s ease;
}
@media (min-width: 768px) { .mob-cta-bar { display: none; } }
.mob-fab {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.24), 0 1px 4px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.mob-fab:active { transform: scale(0.92); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.mob-fab-wa  { background: #25D366; }
.mob-fab-tel { background: var(--pine); }

/* ── Team section ───────────────────────────────── */
.team-photo-wrap {
  border-radius: 2rem;
  overflow: hidden;
  position: relative;
}
.team-photo-wrap::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(175deg, transparent 55%, rgba(26,58,43,.14) 100%);
  pointer-events: none;
}
.credential-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--pine-light); color: var(--pine);
  border: 1px solid rgba(26,58,43,.12);
  border-radius: 999px; padding: 6px 14px;
  font-size: 12px; font-weight: 600;
}

/* ── Cookie banner ──────────────────────────────── */
#cookie-banner {
  position: fixed; bottom: 20px; right: 20px; z-index: 998;
  max-width: 380px; width: calc(100% - 40px);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 20px 60px -12px rgba(26,26,24,.14);
  transform: translateY(120px); opacity: 0;
  transition: transform var(--ease-spring) .5s, opacity var(--ease-out) .4s;
  pointer-events: none;
}
#cookie-banner.show {
  transform: translateY(0); opacity: 1; pointer-events: auto;
}
@media (max-width: 480px) {
  #cookie-banner { bottom: 0; right: 0; left: 0; width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; }
}

/* ════════════════════════════════════════════════
   RESPONSIVE & MOBILE UX SYSTEM
   iOS, touch devices, small viewports
════════════════════════════════════════════════ */

/* ── CSS custom property: nav clearance height ── */
:root { --nav-h: 76px; }
@media (max-width: 640px) { :root { --nav-h: 68px; } }

/* ── Nav: white text + icons when transparent (over hero) ── */
.nav-pill:not(.scrolled) a:not(.btn),
.nav-pill:not(.scrolled) .fd { color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.28); }
.nav-pill:not(.scrolled) .ham-line { background: #fff; }
/* CTA button stays green but gets white border when nav is transparent */
.nav-pill:not(.scrolled) .btn-pine {
  background: rgba(26,58,43,.80);
  border: 1px solid rgba(255,255,255,.30);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px -4px rgba(0,0,0,.30);
}

/* ── 1. iOS Safari auto-zoom prevention
   Font size < 16px triggers zoom on input focus ─ */
.ff,
select.ff,
textarea.ff { font-size: 16px; }

/* ── 2. Touch-action: eliminate 300ms tap delay ─ */
a, button, label, summary, .chip, .btn, .gal-img, .ba-wrap {
  touch-action: manipulation;
}

/* ── 3. Hero image: 4/5 is too tall on mobile/tablet.
   Switch to widescreen ratio under lg breakpoint. ─ */
@media (max-width: 1023px) {
  #hero-main-img { aspect-ratio: 16/9 !important; }
}

/* ── 4. Hero image wrap: space for floating card ─ */
@media (max-width: 1023px) {
  #hero-img-wrap { padding-bottom: 2rem; }
}

/* ── 5. Cookie banner: sit above mobile CTA bar ─ */
@media (max-width: 767px) {
  #cookie-banner {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px;
    right: 12px; left: 12px; width: auto; max-width: 100%;
  }
}

/* ── 6. Form chips: full-width stack on small screens,
   ensuring long Italian strings don't overflow. ─ */
@media (max-width: 560px) {
  #contact-form fieldset .flex.flex-wrap { flex-direction: column; }
  .chip {
    width: 100%;
    justify-content: flex-start;
    border-radius: 14px;
    min-height: 48px;
    font-size: 13.5px;
    white-space: normal;
    text-align: left;
    line-height: 1.35;
    padding: 11px 16px;
  }
}

/* ── 7. Remove hover transforms on touch devices
   (hover states persist after tap on iOS) ──────── */
@media (hover: none) and (pointer: coarse) {
  .db:hover .db-inner {
    transform: none;
    box-shadow: inset 0 1px 1px rgba(255,255,255,.80),
                0 1px 2px rgba(0,0,0,0.04);
  }
  .db-pine:hover .db-inner { box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
  .btn-pine:hover  { transform: none; box-shadow: 0 8px 24px -8px rgba(26,58,43,.42); }
  .btn-stone:hover { transform: none; box-shadow: 0 10px 28px -8px rgba(139,111,71,.46); }
  .btn-outline:hover { transform: none; }
  .gal-img:hover img { transform: none; }
}

/* ── 8. Trust bar: hide vertical dividers when wrapped ─ */
@media (max-width: 767px) {
  .trust-bar div.hr { display: none !important; }
  .trust-bar .trust-item { font-size: 12px; }
}

/* ── 9. Process dot: compact on very small screens ─ */
@media (max-width: 400px) {
  .proc-dot { width: 38px; height: 38px; font-size: 11px; }
  .proc-list::before { left: 19px; }
}

/* ── 10. Scarcity/long CTA buttons: allow text wrap ─ */
@media (max-width: 479px) {
  .btn-stone,
  .btn-pine,
  .btn-outline {
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }
}

/* ── 11. B/A sliders: reliable touch drag ──────── */
.ba-range     { touch-action: none; }
.ba-wrap      { -webkit-user-select: none; user-select: none; }

/* B/A tall slider: too tall on mobile */
@media (max-width: 767px) {
  #ba1 { aspect-ratio: 4/3 !important; min-height: unset !important; }
}

/* ── 12. Section intro margins: tighter on mobile ─ */
@media (max-width: 767px) {
  .mb-20 { margin-bottom: 2.5rem; }
  .mb-16 { margin-bottom: 2rem; }
  .mb-14 { margin-bottom: 2rem; }
}

/* ── 13. FAQ accordion: larger tap target ─────── */
details.acc summary { min-height: 48px; align-items: center; }

/* ── 14. Chip focus accessibility ──────────────── */
.chip:focus-within {
  outline: 2px solid var(--stone);
  outline-offset: 3px;
  border-radius: 14px;
}

/* ── 15. iOS autofill dark form fix ─────────────── */
.ff:-webkit-autofill,
.ff:-webkit-autofill:hover,
.ff:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px rgba(26,58,43,.25) inset;
  -webkit-text-fill-color: rgba(255,255,255,.9);
  caret-color: #fff;
}

/* ── 16. Select: custom arrow on dark background ─ */
select.ff {
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,.45)' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
  cursor: pointer;
}

/* ── 17. Pain points closing callout: tighter gap ─ */
@media (max-width: 767px) {
  #pain .mt-24 { margin-top: 3rem; }
}

/* ── 18. Gallery: B/A wrap tall slider on mobile ─ */
@media (max-width: 767px) {
  .lg\:row-span-2 { grid-row: auto; }
}

/* ── 19. Footer grid: 2-col then 1-col on smallest ─ */
@media (max-width: 767px) {
  footer .md\:col-span-2 { grid-column: 1 / -1; }
}
@media (max-width: 479px) {
  footer .grid.md\:grid-cols-4 { grid-template-columns: 1fr; }
}

/* ── 20. Overscroll behavior: prevent body bounce
   triggering accidental pull-to-refresh on iOS ── */
body { overscroll-behavior-y: none; }
main { overscroll-behavior-y: auto; }

/* ── 21. Smooth scrolling with reduced motion fallback ─ */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ── 22. Testimonials: remove stagger offset on mobile ─ */
@media (max-width: 767px) {
  .md\:mt-8 { margin-top: 0 !important; }
}

/* ── 23. Eyebrow pill: smaller on mobile ──────── */
@media (max-width: 479px) {
  .eyebrow-pill { font-size: 9px; padding: 5px 12px; }
}

/* ── 24. Numeri section: tighter number size on mobile ─ */
@media (max-width: 479px) {
  .stat-n[style*="5rem"] { font-size: clamp(2.4rem,10vw,3.6rem) !important; }
}

/* ── 25. Contatti section: vertical gap tighter on mobile ─ */
@media (max-width: 1023px) {
  #contatti .gap-14 { gap: 2.5rem; }
}

/* ── 26. Nav pill z-index stacking context ──────── */
.nav-pill { isolation: isolate; }

/* ── 27. Image loading aesthetic ──────────────── */
img { background-color: var(--rule); }
img[loading="lazy"] { color: transparent; }

/* 25. Mobile hero optimizations */
@media (max-width: 767px) {
  #hero-bg-img { object-position: 72% center; }
  /* Zone bar: single scrollable line */
  #hero-zone-inner {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    justify-content: flex-start !important;
    scrollbar-width: none; -ms-overflow-style: none;
    padding-left: 16px !important; padding-right: 16px !important;
    gap: 0 8px !important;
  }
  #hero-zone-inner::-webkit-scrollbar { display: none; }
  /* CTA: compact */
  .btn.btn-pine { font-size: 13px !important; padding: 11px 16px !important; }
  .h-hero { letter-spacing: -.025em; }
  /* Tighten hero element spacing on mobile */
  .eyebrow-pill.rv { margin-bottom: 14px !important; }
  .lede.mt-4 { margin-top: 12px !important; }
}

/* Prerogito: dark card highlight */
.prerogito-card {
  background: var(--pine);
  border-radius: 28px;
  padding: 52px 60px;
  box-shadow: 0 24px 64px -16px rgba(15,36,25,.35);
}
@media (max-width: 767px) {
  .prerogito-card { padding: 32px 24px; border-radius: 20px; }
}
.prerogito-card h2 { color: #fff !important; }
.prerogito-card .ac { color: #D4C9A8 !important; }
.prerogito-card .eyebrow-pill {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.22) !important;
  color: rgba(255,255,255,.82) !important;
}
.prerogito-card p { color: rgba(255,255,255,.76) !important; }
.prerogito-card strong { color: #fff !important; }
.prerogito-card .btn-stone {
  background: #fff !important;
  color: var(--pine) !important;
  border-color: rgba(255,255,255,.4) !important;
}

/* ── Cantiere: responsive column border (top on mobile, left on desktop) ── */
.ca2-right-col {
  border-top: 1px solid var(--rule);
}
@media (min-width: 1024px) {
  .ca2-right-col {
    border-top: none;
    border-left: 1px solid var(--rule);
  }
}

/* ── Prerogito: tighter inner card padding on small screens ──────────── */
@media (max-width: 639px) {
  .prerogito-card .db-inner { padding: 22px 18px !important; }
}

/* ── Form: inline validation error states ───────────────────────────── */
.ff.ff-invalid {
  border-color: rgba(220, 60, 60, .55) !important;
  box-shadow: 0 0 0 3px rgba(220, 60, 60, .08);
}
.ff-error-msg {
  display: block;
  font-size: 11px;
  color: rgba(255, 120, 120, .9);
  margin-top: 5px;
  font-family: 'Outfit', sans-serif;
  letter-spacing: .01em;
}

/* ── Stats counter: prevent transition flicker during GSAP update ────── */
.stat-n { transition: none; }

/* ── Hero CTA: on very small screens allow multi-line ───────────────── */
@media (max-width: 360px) {
  .h-hero { font-size: 2rem !important; letter-spacing: -.02em; }
  .lede   { font-size: .96rem !important; }
}

/* ── Brand logos: prevent min-width overflow on very small screens ────── */
@media (max-width: 479px) {
  .flex.flex-wrap > a[style*="min-width:210px"] {
    min-width: 0 !important;
    width: 100%;
  }
}

/* ── Cantiere left panel: border-bottom only shows on mobile ─────────── */
@media (min-width: 1024px) {
  #cantiere .lg\:col-span-2[style*="border-bottom"] {
    border-bottom: none !important;
  }
}

/* ── Paragrafi: strong semantico con peso 600 e colore ereditato ─────── */
p strong, li strong {
  font-weight: 600;
  color: inherit;
}
/* Su sfondi scuri (pine) il strong eredita ma rende il testo leggermente più chiaro */
[style*="background:var(--pine)"] p strong,
[style*="background:#0c1e16"] p strong,
.prerogito-card p strong {
  color: rgba(255,255,255,.92);
}

/* ── Process step badges ────────────────────────── */
.proc-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--stone);
  background: rgba(139,111,71,.10);
  border: 1px solid rgba(139,111,71,.22);
  border-radius: 20px;
  padding: 3px 11px 3px 11px;
  line-height: 1.7;
  white-space: nowrap;
}
.proc-badge-free {
  color: #1a5c35;
  background: rgba(26,92,53,.08);
  border-color: rgba(26,92,53,.22);
}

/* ── Pre-acquisto card ──────────────────────────── */
.proc-preacq {
  background: rgba(26,58,43,.05);
  border: 1px solid rgba(26,58,43,.13);
  border-radius: 14px;
  padding: 18px 20px 20px;
}
.proc-preacq-label {
  display: inline-flex;
  align-items: center;
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--pine);
  background: rgba(26,58,43,.09);
  border: 1px solid rgba(26,58,43,.18);
  border-radius: 20px;
  padding: 2px 10px;
}

/* ── Pain point cards ───────────────────────────── */
.pain-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(192,98,45,.16);
  border-left: 3px solid rgba(192,98,45,.50);
  padding: 26px 24px 28px 22px;
  box-shadow: 0 3px 20px -8px rgba(26,58,43,.08);
  display: flex;
  flex-direction: column;
}
.pain-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #C0622D;
}


/* ═══════════════════════════════════════════════════
   OTTIMIZZAZIONI SEZIONI — post-reorder UX/UI
═══════════════════════════════════════════════════ */

/* ── Transizione Hero → Pain Points
   Gradiente di raccordo: il titolo Pain Points
   si separa visivamente dal dark hero con una
   sottile ombra superiore                         ── */
#pain {
  box-shadow: inset 0 6px 32px -12px rgba(12,30,22,.12);
}

/* ── Sezione Benefici: top border per separare
   dal Pain Points quando i bg sono adiacenti      ── */
section.py-16 {
  border-top: 1px solid rgba(221,213,200,.5);
}

/* ── Testimonianze (cream) → Instagram (white): il contrasto
   cromatico naturale separa le sezioni senza border aggiuntivi ── */

/* ── Visual rhythm: Pain Points atmospheric photo ── */
#pain .rv[style*="border-radius:22px"] img {
  filter: saturate(.65) contrast(1.10);
}

/* ── Scroll margin corretto per sezioni con nav fissa ── */
#pain, #servizi, #processo, #cantiere, #progetti, #faq, #contatti, #prerogito, #instagram {
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

/* ── FAQ dopo Instagram (entrambi white): separatore  ── */
#faq {
  border-top: 1px solid var(--rule);
}

/* ── Instagram grid: su mobile usa scroll orizzontale
   invece di 2 colonne troppo alte               ── */
@media (max-width: 640px) {
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-5 {
    grid-template-columns: repeat(5, 70vw);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    padding-bottom: 8px;
  }
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-5::-webkit-scrollbar {
    display: none;
  }
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-5 .ig-post {
    flex-shrink: 0;
    width: 70vw;
    border-radius: 12px;
  }
  /* L'ultimo post "col-span-2 md:col-span-1" non deve spannarsi su mobile scroll */
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-5 .ig-post.col-span-2 {
    width: 70vw;
    grid-column: auto;
  }
}

/* ── Pain Points closing callout: padding bottom
   ridotto su mobile per non creare gap eccessivo ── */
@media (max-width: 767px) {
  #pain .mt-10.md\:mt-24 { margin-top: 2.5rem; }
}

/* -- Contact section redesign ------------------- */
.contact-mauro-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 16px;
  padding: 18px 20px 20px;
}
.contact-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--stone);
  border: 2px solid rgba(255,255,255,.20);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 1.1rem;
  color: #fff; font-weight: 500; flex-shrink: 0;
  position: relative;
}
.contact-avatar::after {
  content: ""; position: absolute; bottom: -3px; right: -3px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #25D366; border: 2.5px solid var(--pine);
  z-index: 2;
  animation: dotOnline 2s ease-in-out infinite;
}
@keyframes dotOnline {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  50%       { box-shadow: 0 0 0 5px rgba(37,211,102,.0); }
}
.contact-section-label {
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  color: rgba(255,255,255,.25);
}
.contact-step-num {
  font-family: 'Fraunces', serif; font-size: 1rem; font-weight: 500;
  color: var(--stone-lt); flex-shrink: 0; line-height: 1.5; min-width: 26px;
}
.contact-phone-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: rgba(139,111,71,.18);
  border: 1px solid rgba(139,111,71,.32);
  display: flex; align-items: center; justify-content: center;
}
.contact-phone-num {
  font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 500;
  color: rgba(255,255,255,.85); letter-spacing: -.02em;
}

/* -- Privacy custom checkbox -------------------- */
.privacy-check-wrap {
  position: relative; flex-shrink: 0;
  width: 22px; height: 22px; margin-top: 1px;
}
.privacy-cb {
  position: absolute; opacity: 0; width: 100%; height: 100%;
  margin: 0; cursor: pointer; z-index: 1;
}
.privacy-check-ui {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.06);
  transition: background .2s ease, border-color .2s ease;
  pointer-events: none;
}
.privacy-check-ui svg { opacity: 0; transition: opacity .15s ease; }
.privacy-cb:checked + .privacy-check-ui {
  background: var(--stone);
  border-color: var(--stone);
}
.privacy-cb:checked + .privacy-check-ui svg { opacity: 1; }
.privacy-label:hover .privacy-check-ui { border-color: rgba(255,255,255,.55); }

/* -- Stats section background overlay ----------- */
.stats-bg-overlay {
  background: radial-gradient(ellipse 65% 75% at 50% 50%, rgba(26,58,43,.12), rgba(15,36,25,.96));
}
@media (max-width: 767px) {
  .stats-bg-overlay {
    background: linear-gradient(160deg, rgba(15,36,25,.55) 0%, rgba(15,36,25,.68) 100%);
  }
}

/* -- Comuni marquee (mobile) -------------------- */
.comuni-marquee-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: comuniScroll 22s linear infinite;
  will-change: transform;
}
@keyframes comuniScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.comuni-item {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.80);
  padding: 0 10px;
}
.comuni-dot {
  color: rgba(255,255,255,.28);
  font-size: 11px;
}
@media (prefers-reduced-motion: reduce) {
  .comuni-marquee-track { animation: none; }
}

/* -- Hero: prevent image stretch on iOS scroll -- */
#hero-bg-img {
  will-change: transform;
  transform: translateZ(0);
}
