/* =====================================================================
   Studio Nutrizione Scrofani - Melis
   CSS unico, mobile-first, nessuna dipendenza esterna.
   ===================================================================== */

/* ---------- Font (ospitati in locale, solo latino) ---------- */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("../fonts/jakarta-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("../fonts/jakarta-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("../fonts/jakarta-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Southland"; src: url("../fonts/southland.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ---------- Token ---------- */
:root {
  --forest: #1f3a2b;
  --forest-2: #2b5038;
  --green: #3d7a4f;
  --sage: #a9c19a;
  --sage-soft: #e3ecda;
  --cream: #f7f2ea;
  --cream-2: #f0e8db;
  --white: #fff;
  --coral: #d65a43;
  --coral-2: #bb4631;
  --butter: #f2c96f;
  --ink: #1c2520;
  --ink-2: #4a564e;
  --line: rgba(31, 58, 43, .12);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: "Southland", "Fraunces", cursive;

  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-pill: 999px;
  --sh-sm: 0 2px 10px rgba(31, 58, 43, .06);
  --sh-md: 0 18px 40px -18px rgba(31, 58, 43, .30);
  --sh-lg: 0 30px 70px -30px rgba(31, 58, 43, .45);

  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (min-width: 960px) { :root { --header-h: 76px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest); }
p { margin: 0 0 1em; color: var(--ink-2); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.12; color: var(--forest); margin: 0 0 .5em; letter-spacing: -.01em; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sage); color: var(--forest); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 1 !important; animation: none !important; }
.ico { width: 1.15em; height: 1.15em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ico-lg { width: 1.35em; height: 1.35em; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: .6rem 1rem; border-radius: var(--r-md); background: var(--forest); color: #fff; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }

.section { padding-block: clamp(4rem, 10vw, 7.5rem); position: relative; }
.section-sage { background: var(--sage-soft); }
.section-cream { background: var(--cream-2); }

.h2 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); }
.h3 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); }
.center { text-align: center; }
.lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem); line-height: 1.75; }

.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-bottom: 1rem;
  font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--coral);
}
.kicker::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; }

.role { font-size: .78rem !important; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--coral) !important; margin-bottom: .6rem; }

.section-head { max-width: 760px; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section > .wrap { position: relative; z-index: 1; }
.bgword {
  position: absolute; z-index: 0; top: clamp(1.5rem, 5vw, 3.5rem);
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(6rem, 24vw, 20rem); line-height: .8; letter-spacing: -.03em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.3px rgba(31, 58, 43, .1);
  pointer-events: none; user-select: none; translate: var(--bx, 0px) 0;
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .8rem 1.5rem;
  border: 0; border-radius: var(--r-pill);
  font-family: var(--body); font-weight: 700; font-size: .98rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s;
}
.btn::after {
  content: ""; position: absolute; inset: 0 auto 0 -60%; width: 45%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(31, 58, 43, .6); }
.btn:hover::after { left: 130%; }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 42px; padding: .6rem 1.15rem; font-size: .9rem; }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-2); color: #fff; }
.btn-forest { background: var(--forest); color: #fff; }
.btn-forest:hover { background: var(--forest-2); color: #fff; }
.btn-light { background: #fff; color: var(--forest); box-shadow: var(--sh-md); }
.btn-light:hover { color: var(--forest); }
.btn-outline { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 2px var(--forest); }
.btn-outline:hover { background: var(--forest); color: #fff; }

.link-btn, .inline-link {
  padding: 0; border: 0; background: none;
  font-weight: 700; color: var(--green);
  text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 4px;
}
.link-btn { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.link-btn .ico { transition: transform .25s var(--ease); }
.link-btn:hover .ico { transform: translateX(4px); }

/* =====================================================================
   HEADER
   ===================================================================== */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  color: #fff;
  transition: background-color .35s, box-shadow .35s, color .35s;
}
/* lo sfondo sfocato sta su uno pseudo-elemento: un backdrop-filter sull'header
   renderebbe l'header il riferimento del pannello menu (position: fixed) */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(247, 242, 234, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  opacity: 0; transition: opacity .35s;
}
.header::after {
  content: ""; position: absolute; inset: 0 0 -40px; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 26, 18, .45), rgba(12, 26, 18, 0));
  transition: opacity .35s;
}
.header.is-solid, .header.is-open { color: var(--forest); }
.header.is-solid::before, .header.is-open::before { opacity: 1; }
.header.is-solid::after, .header.is-open::after { opacity: 0; }
.header-in { height: 100%; max-width: 1320px; margin-inline: auto; padding-inline: 16px; display: flex; align-items: center; gap: 1rem; }
@media (min-width: 720px) { .header-in { padding-inline: 32px; } }

.brand { display: flex; align-items: center; gap: .6rem; min-width: 0; color: inherit; text-decoration: none; margin-right: auto; }
.brand img { width: 38px; height: auto; padding: 5px 7px; border-radius: 12px; background: var(--cream); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .35); transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-10deg) scale(1.06); }
.brand-name {
  font-family: var(--brand); font-weight: 400;
  font-size: 1.35rem; line-height: 1; padding-top: .3em;
  -webkit-text-stroke: .35px currentColor;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: inherit;
}
@media (min-width: 400px) { .brand-name { font-size: 1.5rem; } }
@media (min-width: 960px) { .brand img { width: 42px; } .brand-name { font-size: 2rem; } }

.menu-btn {
  display: grid; place-items: center;
  width: 46px; height: 46px; border: 0; border-radius: 14px;
  background: rgba(255, 255, 255, .16); color: inherit;
  transition: background .3s;
}
.is-solid .menu-btn, .is-open .menu-btn { background: var(--sage-soft); }
.menu-btn .ico { width: 24px; height: 24px; }

/* nav mobile: pannello a tutto schermo */
.nav {
  position: fixed; inset: var(--header-h) 0 0; z-index: 49;
  display: flex; flex-direction: column; gap: .25rem;
  padding: 2rem 24px calc(2rem + env(safe-area-inset-bottom));
  background: var(--cream);
  visibility: hidden; opacity: 0; transform: translateY(-12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
}
.nav a:not(.btn) {
  font-family: var(--display); font-size: 2.1rem; line-height: 1.2;
  color: var(--forest); text-decoration: none;
  padding: .55rem 0; border-bottom: 1px solid var(--line);
}
.nav .nav-cta { margin-top: 1.5rem; align-self: flex-start; min-height: 52px; padding-inline: 2rem; font-size: 1.05rem; }
.header.is-open .nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.header.is-open .nav a:not(.btn) { animation: navIn .5s var(--ease) both; }
.header.is-open .nav a:nth-child(2) { animation-delay: .05s; }
.header.is-open .nav a:nth-child(3) { animation-delay: .1s; }
.header.is-open .nav a:nth-child(4) { animation-delay: .15s; }
.header.is-open .nav a:nth-child(5) { animation-delay: .2s; }
@keyframes navIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

/* menu completo solo da 1100px: sotto, con la voce "Dicono di noi", non ci sta su una riga */
@media (min-width: 1100px) {
  .menu-btn { display: none; }
  .nav {
    position: static; flex-direction: row; align-items: center; gap: .25rem;
    padding: 0; background: none; visibility: visible; opacity: 1; transform: none;
  }
  .nav a:not(.btn) {
    position: relative; font-family: var(--body); font-size: .95rem; font-weight: 600; white-space: nowrap;
    color: inherit; border: 0; padding: .5rem .9rem;
  }
  .nav a:not(.btn)::after {
    content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .2rem; height: 2px; border-radius: 2px;
    background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
  }
  .nav a:not(.btn):hover::after, .nav a.is-current::after { transform: scaleX(1); }
  .nav .nav-cta { margin: 0 0 0 .75rem; min-height: 44px; padding-inline: 1.4rem; font-size: .95rem; }
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative; overflow: hidden;
  height: 100vh; height: 100svh; min-height: 560px; max-height: 1000px;
  display: flex; align-items: center;
  color: #fff; background: var(--forest); text-align: center;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; animation: kenburns 9s ease-out both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1.01); } }
.hero-slides::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(12, 26, 18, .38), rgba(12, 26, 18, 0) 75%),
    linear-gradient(180deg, rgba(12, 26, 18, .5) 0%, rgba(12, 26, 18, .3) 35%, rgba(12, 26, 18, .4) 60%, rgba(12, 26, 18, .8) 100%);
}
.hero-content {
  position: relative; z-index: 2; width: 100%; max-width: 1200px; margin-inline: auto;
  padding: calc(var(--header-h) + 1rem) 20px calc(4.5rem + env(safe-area-inset-bottom));
}
@media (min-width: 720px) { .hero-content { padding-inline: 48px; } }
.hero-quote {
  max-width: 1000px;
  margin: 0 auto 2rem;
  font-family: var(--brand); font-weight: 400;
  font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.6rem); line-height: 1.28;
  -webkit-text-stroke: .6px #fff;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .35);
  animation: quoteIn 1.6s var(--ease) .15s both;
}
.js .hero-quote[data-words] { animation: none; }
.hero-quote .w { display: inline-block; white-space: nowrap; }
.hero-quote .w > span { display: inline-block; animation: wordIn 1s var(--ease) both; animation-delay: calc(.25s + var(--i) * 70ms); }
@keyframes wordIn { from { opacity: 0; transform: translateY(.45em) rotate(3deg); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes quoteIn { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .9rem 1.1rem; animation: quoteIn 1.2s var(--ease) 1.6s both; }
.hero .btn-coral { animation: ctaPulse 3.2s ease-out 3s infinite; }
@keyframes ctaPulse { 0% { box-shadow: 0 0 0 0 rgba(214, 90, 67, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(214, 90, 67, 0); } }
.btn-glass { color: #fff; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-glass:hover { color: var(--forest); background: #fff; }
.btn-glass .ico { transition: transform .3s var(--ease); }
.btn-glass:hover .ico { transform: translateX(4px); }
.hero-slides, .hero-content { will-change: transform; }

.hero-dots { position: absolute; z-index: 3; left: 50%; bottom: calc(1.6rem + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; }
.hero-dots span { position: relative; overflow: hidden; width: 8px; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .45); transition: width .5s var(--ease); }
.hero-dots span.is-active { width: 38px; }
.hero-dots span.is-active::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: dotFill 6s linear both; }
@keyframes dotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-scroll { position: absolute; z-index: 3; right: 32px; bottom: 2rem; width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 14px; display: none; }
.hero-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (min-width: 960px) { .hero-scroll { display: block; } }

/* =====================================================================
   CONCETTO
   ===================================================================== */
.concept { overflow: hidden; }
.concept-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .concept-grid { grid-template-columns: .9fr 1.1fr; gap: 5rem; } }

.concept-media { position: relative; justify-self: center; width: min(78vw, 460px); }
.concept-media::before {
  content: ""; position: absolute; inset: -9% -12% -6% -8%; z-index: 0;
  background: var(--sage-soft); border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%;
  animation: blob 14s ease-in-out infinite;
}
.plate { position: relative; z-index: 1; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: var(--sh-lg); }
.plate img { width: 100%; height: 100%; object-fit: cover; animation: spin 120s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin-badge {
  position: absolute; z-index: 2; right: -2%; top: -4%;
  display: grid; place-items: center; width: clamp(108px, 26vw, 140px); aspect-ratio: 1;
  border-radius: 50%; background: var(--cream); box-shadow: var(--sh-md);
}
.spin-ring { position: absolute; inset: 6%; width: 88%; height: 88%; animation: spin 22s linear infinite; }
.spin-ring text { font-family: var(--body); font-size: 10px; font-weight: 800; fill: var(--forest); }
.spin-badge-ico { display: grid; place-items: center; width: 42%; aspect-ratio: 1; border-radius: 50%; background: var(--butter); color: var(--forest); }
.spin-badge-ico .ico { width: 45%; height: 45%; }
@keyframes blob {
  0%, 100% { border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%; transform: rotate(0); }
  50% { border-radius: 42% 58% 40% 60% / 58% 40% 60% 42%; transform: rotate(10deg); }
}

.morph {
  position: relative; height: 1.15em; margin-bottom: .35em;
  font-family: var(--display); font-style: italic; font-size: clamp(2.6rem, 1.6rem + 5vw, 5rem); line-height: 1.15;
  color: var(--coral);
}
.morph span[aria-hidden] { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; animation: morph 10.5s var(--ease) infinite; }
.morph span:nth-child(2) { animation-delay: 3.5s; }
.morph span:nth-child(3) { animation-delay: 7s; }
@keyframes morph {
  0% { opacity: 0; transform: translateY(.35em); filter: blur(6px); }
  6%, 28% { opacity: 1; transform: none; filter: none; }
  34%, 100% { opacity: 0; transform: translateY(-.35em); filter: blur(6px); }
}
.concept-text .btn { margin-top: .5rem; }

/* =====================================================================
   SU DI NOI
   ===================================================================== */
.work { display: grid; gap: 2.5rem; align-items: center; margin-bottom: clamp(4rem, 9vw, 6rem); }
@media (min-width: 960px) { .work { grid-template-columns: 1.05fr .95fr; gap: 4rem; } }
.work-photo { margin: 0; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg); background: #ddd; }
.work-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 18%; }
@media (min-width: 960px) { .work-photo img { aspect-ratio: 4 / 5; } .work-photo { max-width: 500px; justify-self: center; } }

.team { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 720px) { .team { grid-template-columns: 1fr 1fr; max-width: 980px; margin-inline: auto; gap: 2rem; } }
.person { position: relative; background: var(--white); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.person:hover { box-shadow: var(--sh-lg); }
.person-photo { display: block; width: 100%; padding: 0; border: 0; overflow: hidden; background: var(--sage-soft); }
.person-photo img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; object-position: 50% 20%; transition: transform .9s var(--ease); }
.person:hover .person-photo img { transform: scale(1.05); }
.person-body { padding: 1.5rem 1.5rem 1.75rem; }
.person-body h3 { font-size: 1.6rem; margin-bottom: .3rem; }

/* =====================================================================
   SERVIZI: tre blocchi semplici, foto con titolo e card sotto
   ===================================================================== */
/* card di presentazione: foto nel suo formato 3:2, titolo, link al dettaglio */
.svc-cards { display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .svc-cards { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.svc-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  color: var(--forest); text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.svc-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .9s var(--ease); }
.svc-card-body { display: flex; flex-direction: column; gap: .6rem; flex: 1; padding: 1.2rem 1.4rem 1.4rem; }
.svc-card-title { font-family: var(--display); font-size: 1.3rem; line-height: 1.25; }
.svc-card-more { margin-top: auto; display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 700; color: var(--coral); }
.svc-card-more .ico { transform: rotate(90deg); transition: transform .3s var(--ease); }
.svc-card:hover { transform: translateY(-6px); box-shadow: var(--sh-md); color: var(--forest); }
.svc-card:hover img { transform: scale(1.05); }
.svc-card:hover .svc-card-more .ico { transform: rotate(90deg) translateX(4px); }

/* dettaglio di ogni servizio */
.svc { margin-top: clamp(3.5rem, 8vw, 5.5rem); padding-top: clamp(2.5rem, 6vw, 3.5rem); border-top: 1px solid var(--line); }
.svc-title { position: relative; max-width: 30ch; margin-bottom: 1.5rem; padding-left: 1.1rem; color: var(--forest); }
.svc-title::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 4px; border-radius: 4px; background: var(--coral); }
.svc-lead { margin-bottom: 1.25rem; }

/* card affiancate sempre della stessa altezza (su telefono sono una sotto l'altra) */
.svc-grid { display: grid; gap: 1.25rem; align-items: stretch; grid-auto-rows: 1fr; }
@media (min-width: 860px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 859px) { .svc-grid { grid-auto-rows: auto; } }
.svc-col { display: flex; flex-direction: column; gap: 1.25rem; }
.svc-col > .card:last-child { flex: 1; }

.card { background: var(--white); border-radius: var(--r-lg); padding: clamp(1.4rem, 3.5vw, 2rem); box-shadow: var(--sh-sm); }
.card h4 { font-size: 1.35rem; margin: 0; display: flex; align-items: center; gap: .7rem; line-height: 1.2; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.card-sub { font-family: var(--display); font-size: 1.1rem; color: var(--forest); margin-bottom: .5rem; }
.card-forest { background: var(--forest); }
.card-forest h4, .card-forest p { color: var(--cream); }
.card-forest p { opacity: .9; }
.card-ico {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  background: var(--butter); color: var(--forest);
}
.card-ico .ico { width: 21px; height: 21px; }

/* collaborazioni: elenco editoriale, una riga per ambito (nome a sinistra, testo a destra) */
.collab-list { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.collab-row { display: grid; gap: .9rem; padding: 1.75rem 0; border-top: 1px solid var(--line); transition: background-color .4s; }
.collab-row:first-child { border-top: 0; }
.collab-name { display: flex; align-items: center; gap: .9rem; margin: 0; font-size: 1.5rem; font-weight: 500; letter-spacing: -.01em; }
.collab-name .card-ico {
  width: 46px; height: 46px; border-radius: 50%;
  background: transparent; color: var(--green); box-shadow: inset 0 0 0 1px var(--sage);
  transition: background-color .4s, color .4s, box-shadow .4s;
}
.collab-name .card-ico .ico { width: 20px; height: 20px; stroke-width: 1.6; }
.collab-text { max-width: 62ch; }
.collab-text p { font-size: .98rem; line-height: 1.8; }
.collab-text p:last-child { margin-bottom: 0; }
.collab-text .checks { margin: 0; }
.collab-text .checks > li { padding: .3rem 0 .3rem 1.6rem; font-size: .98rem; line-height: 1.8; }
.collab-text .checks > li::before { top: 1.2rem; width: 12px; height: 1.5px; border-radius: 1px; background: var(--coral); }
.collab-row:hover .card-ico { background: var(--forest); color: var(--cream); box-shadow: none; }
@media (min-width: 760px) {
  .collab-row { grid-template-columns: 280px 1fr; gap: 2.5rem; padding: 2.25rem 0; align-items: start; }
  .collab-name { position: sticky; top: calc(var(--header-h) + 24px); }
}
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .8rem; border-radius: var(--r-pill);
  background: var(--sage-soft); color: var(--forest);
  font-size: .82rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
}
.badge-light { background: rgba(255, 255, 255, .14); color: var(--cream); }

/* liste con spunta */
.checks { list-style: none; margin-bottom: 1.25rem; }
.checks > li { position: relative; padding: .35rem 0 .35rem 2rem; color: var(--ink-2); }
.checks > li::before {
  content: ""; position: absolute; left: 0; top: .6rem; width: 20px; height: 20px; border-radius: 50%;
  background: var(--sage-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d7a4f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.checks ul { list-style: none; margin: .5rem 0 0; }
.checks ul li { position: relative; padding: .25rem 0 .25rem 1.1rem; }
.checks ul li::before { content: ""; position: absolute; left: 0; top: .85rem; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }

.card-flex { display: flex; flex-direction: column; }
.card-notes { margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--sage); }
.card-flex .checks { margin-bottom: 1.25rem; }
.card-notes p { margin: 0 0 .2rem; font-size: .85rem; line-height: 1.5; }

/* =====================================================================
   LO STUDIO
   ===================================================================== */
.studio-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .studio-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.js .signoff[data-write] { clip-path: inset(-20% 100% -20% 0); transition: clip-path 1.8s cubic-bezier(.6, .1, .3, 1) .2s; }
.js .signoff[data-write].in { clip-path: inset(-20% -10% -20% 0); }
.signoff { font-family: var(--brand); font-size: 2.2rem; line-height: 1; color: var(--forest); -webkit-text-stroke: .4px var(--forest); margin-top: .5rem; }


.collage { position: relative; height: clamp(380px, 95vw, 560px); }
@media (min-width: 960px) { .collage { height: 580px; } }
.pol {
  position: absolute; margin: 0; padding: 10px 10px 34px; background: #fff; border-radius: 6px;
  box-shadow: 0 22px 40px -18px rgba(31, 58, 43, .45);
  rotate: var(--r); translate: 0 var(--py, 0);
  transition: rotate .6s var(--ease), scale .6s var(--ease), box-shadow .6s var(--ease);
}
.pol img { width: 100%; object-fit: cover; border-radius: 2px; }
.pol-1 { --r: -5deg; left: 0; top: 8%; width: 62%; z-index: 2; }
.pol-1 img { aspect-ratio: 1 / 1.05; object-position: 50% 30%; }
.pol-2 { --r: 6deg; right: 0; top: 0; width: 46%; z-index: 1; }
.pol-2 img { aspect-ratio: 4 / 3.4; }
.pol-3 { --r: -2deg; right: 6%; bottom: 0; width: 52%; z-index: 3; }
.pol-3 img { aspect-ratio: 4 / 3; }
.pol:hover { --r: 0deg; scale: 1.04; z-index: 4; box-shadow: 0 30px 60px -20px rgba(31, 58, 43, .55); }
.js .collage[data-reveal] .pol { scale: .85; opacity: 0; transition: rotate .6s var(--ease), scale 1s var(--ease), opacity 1s var(--ease); }
.js .collage[data-reveal].in .pol { scale: 1; opacity: 1; }
.js .collage[data-reveal].in .pol-2 { transition-delay: .15s; }
.js .collage[data-reveal].in .pol-3 { transition-delay: .3s; }

.visit-us {
  display: grid; margin-top: clamp(3rem, 7vw, 5rem);
  background: var(--white); border-radius: var(--r-xl) clamp(60px, 12vw, 160px) var(--r-xl) var(--r-xl); overflow: hidden; box-shadow: var(--sh-md);
}
@media (min-width: 960px) { .visit-us { grid-template-columns: .9fr 1.1fr; } }
.visit-us-info { padding: clamp(1.5rem, 4vw, 3rem); }
.sedi { list-style: none; display: grid; gap: .6rem; margin-bottom: 1.25rem; }
.sedi li { display: flex; align-items: flex-start; gap: .75rem; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--cream); color: var(--ink-2); line-height: 1.5; }
.sedi li .ico { flex: 0 0 auto; margin-top: .2rem; color: var(--coral); }
.sedi li strong { display: block; font-family: var(--display); font-weight: 500; font-size: 1.12rem; color: var(--forest); }
.sedi .sede-main { background: var(--sage-soft); color: var(--forest); font-weight: 600; }
.sedi-k { margin: .25rem 0 .6rem; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--coral); }


.map { position: relative; min-height: 320px; background: var(--sage-soft); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-facade { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 1rem; padding: 1.5rem; text-align: center; }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-pin {
  position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); background: var(--coral); color: #fff; box-shadow: var(--sh-md);
  animation: pin 2.4s var(--ease) infinite;
}
.map-pin .ico { transform: rotate(45deg); width: 26px; height: 26px; }
@keyframes pin { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.map-load { position: relative; }
.map-note { position: relative; max-width: 30ch; margin: 0; font-size: .8rem; color: var(--ink-2); }

/* =====================================================================
   CONTATTI
   ===================================================================== */
.contacts { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .contacts { grid-template-columns: repeat(3, 1fr); } }
.contact-card { background: var(--white); border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--sh-sm); }
.contact-card h3 { font-size: 1.4rem; margin-bottom: .25rem; }
.contact-card-accent { background: var(--sage-soft); box-shadow: none; }
.contact-links { list-style: none; display: grid; gap: .5rem; }
.contact-links a {
  display: flex; align-items: center; gap: .75rem; min-height: 48px;
  padding: .55rem .8rem; border-radius: 14px;
  background: var(--cream); color: var(--forest); text-decoration: none;
  font-weight: 600; font-size: .93rem; overflow-wrap: break-word;
  transition: background .25s, transform .25s var(--ease);
}
.contact-card-accent .contact-links a { background: rgba(255, 255, 255, .7); }
.contact-links a:hover { background: var(--sage); transform: translateX(3px); }
.contact-links .ico { color: var(--coral); }

.booking {
  display: grid; gap: 2rem; margin-top: clamp(3.5rem, 8vw, 5.5rem);
  padding: clamp(1.5rem, 5vw, 3.5rem); border-radius: var(--r-xl) var(--r-xl) var(--r-xl) clamp(60px, 12vw, 160px);
  background: var(--forest); position: relative; overflow: hidden;
}
.booking::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -200px; top: -240px; border-radius: 50%;
  background: var(--forest-2);
}
@media (min-width: 960px) { .booking { grid-template-columns: .8fr 1.2fr; gap: 3.5rem; align-items: center; } }
.booking-intro { position: relative; }
.booking-intro .h2 { color: var(--cream); font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
.booking-intro p { color: rgba(247, 242, 234, .85); margin-bottom: 0; }

.form {
  position: relative; display: grid; gap: 1rem;
  background: var(--white); border-radius: var(--r-lg); padding: clamp(1.25rem, 4vw, 2.25rem);
  box-shadow: var(--sh-lg);
}
@media (min-width: 640px) { .form { grid-template-columns: 1fr 1fr; } .field-full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 700; color: var(--forest); }
.field .opt { font-weight: 400; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: .8rem 1rem;
  border: 1.5px solid transparent; border-radius: 14px;
  background: var(--cream); color: var(--ink);
  font: inherit; font-size: 1rem; /* 16px: niente zoom automatico su iPhone */
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover, .field textarea:hover { border-color: var(--sage); }
.field input:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--green); box-shadow: 0 0 0 4px rgba(61, 122, 79, .15); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--coral); background: #fff6f3; }
.field.is-invalid label { color: var(--coral-2); }

.consent { display: flex; align-items: flex-start; gap: .7rem; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--green); flex: 0 0 auto; }
.consent.is-invalid { color: var(--coral-2); }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-foot .btn { min-width: 150px; }
.form-foot .btn.is-sending { pointer-events: none; opacity: .85; }
.form-foot .btn.is-sending .ico { animation: spin 1s linear infinite; }
.form-msg { margin: 0; font-size: .92rem; font-weight: 600; flex: 1 1 220px; }
.form-msg.is-ok { color: var(--green); }
.form-msg.is-err { color: var(--coral-2); }

.social { text-align: center; margin-top: clamp(3.5rem, 8vw, 5rem); }
.social p { max-width: 560px; margin-inline: auto; }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.25rem; }
.pill {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 48px;
  padding: .55rem 1.35rem .55rem .55rem; border-radius: var(--r-pill);
  background: var(--white); color: var(--forest); box-shadow: inset 0 0 0 1.5px var(--line), var(--sh-sm);
  font-weight: 700; text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
}
.pill .ico { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--sage-soft); color: var(--forest); transition: background .25s, color .25s; }
.pill:hover { transform: translateY(-3px); background: var(--forest); color: var(--cream); box-shadow: var(--sh-md); }
.pill:hover .ico { background: var(--coral); color: #fff; }

/* =====================================================================
   DICONO DI NOI (recensioni Google)
   ===================================================================== */
.reviews-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; max-width: none; }
.reviews-head .h2 { margin-bottom: 0; }
.reviews-score {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1.4rem .9rem 1rem; border-radius: var(--r-pill); background: var(--white); box-shadow: var(--sh-sm);
}
.g-logo { width: 38px; height: 38px; flex: 0 0 auto; }
.reviews-rating { display: flex; align-items: center; gap: .6rem; margin: 0; }
.reviews-rating strong { font-family: var(--display); font-size: 2rem; line-height: 1; color: var(--forest); }
.reviews-count { margin: .15rem 0 0; font-size: .85rem; }

/* stelle con riempimento parziale (es. 4,7) */
.stars {
  --rating: 5;
  display: inline-block; font-size: 1.05rem; letter-spacing: .12em; line-height: 1;
  background: linear-gradient(90deg, #f4b400 calc(var(--rating) / 5 * 100%), #d8d1c2 0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.reviews-carousel { position: relative; }
.reviews-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 380px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  margin-inline: -20px; padding: .5rem 20px 1.75rem;
}
.reviews-track::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .reviews-track { margin-inline: 0; padding-inline: 0; } }
.review {
  position: relative; display: flex; flex-direction: column; gap: .8rem; margin: 0;
  padding: 1.6rem 1.6rem 1.4rem; border-radius: var(--r-lg); background: var(--white); box-shadow: var(--sh-sm);
  scroll-snap-align: start; overflow: hidden;
  animation: reviewIn .8s var(--ease) both; animation-delay: calc(var(--d, 0) * 120ms);
}
@keyframes reviewIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.review::before {
  content: "\201C"; position: absolute; right: 1.1rem; top: -.6rem;
  font-family: var(--display); font-size: 6.5rem; line-height: 1; color: var(--coral); opacity: .16; pointer-events: none;
}
.review-top { display: flex; align-items: center; gap: .8rem; }
.review-avatar {
  display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  background: var(--sage-soft); color: var(--forest); font-weight: 800; font-size: .9rem;
}
.review-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.review-author { font-weight: 700; color: var(--forest); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.review-author:hover { text-decoration: underline; }
.review-time { font-size: .82rem; color: var(--ink-2); }
.review-text {
  margin: 0; color: var(--ink-2); font-size: .97rem; line-height: 1.7; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.review.is-open .review-text { -webkit-line-clamp: unset; display: block; }
.review-more { align-self: flex-start; margin-top: auto; padding: 0; border: 0; background: none; font-weight: 700; font-size: .9rem; color: var(--green); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--sage); }

.reviews-nav {
  position: absolute; top: calc(50% - 1rem); z-index: 2; display: none; place-items: center;
  width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--white); color: var(--forest); box-shadow: var(--sh-md);
  transition: opacity .3s, transform .3s var(--ease), background .3s, color .3s;
}
.reviews-nav:hover { background: var(--forest); color: var(--cream); }
.reviews-nav:disabled { opacity: 0; pointer-events: none; }
.reviews-prev { left: -24px; }
.reviews-prev .ico { transform: rotate(180deg); }
.reviews-next { right: -24px; }
@media (min-width: 960px) and (hover: hover) { .reviews-nav { display: grid; } }

.reviews-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.reviews-source { margin: 1rem 0 0; font-size: .8rem; color: var(--ink-2); }
/* recensioni e contatti hanno lo stesso sfondo: tra le due sezioni basta meta' dello spazio abituale */
#recensioni { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
#recensioni + #contatti { padding-top: clamp(2.5rem, 5vw, 4rem); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer { background: var(--forest); color: rgba(247, 242, 234, .85); padding: clamp(3.5rem, 8vw, 5rem) 0 calc(1.5rem + env(safe-area-inset-bottom)); }
.footer p { color: inherit; }
.footer a { color: var(--cream); text-decoration: none; overflow-wrap: break-word; }
.footer a:hover { color: var(--butter); }
.footer strong { color: var(--butter); font-weight: 700; }
.footer-grid { display: grid; gap: 2.25rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-brand img { width: 58px; margin-bottom: 1rem; padding: 8px 10px; border-radius: 18px; background: var(--cream); }
.brand-name-light { font-size: 2.1rem; color: var(--cream); -webkit-text-stroke: .5px var(--cream); margin-bottom: .5rem; white-space: normal; }
.footer-title { font-size: 1.3rem; color: var(--cream); margin-bottom: 1rem; }
.footer-social { display: flex; gap: .7rem; margin-top: 1.25rem; }
.footer-social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(247, 242, 234, .45); transition: background .25s, color .25s, box-shadow .25s, transform .25s var(--ease); }
.footer-social a .ico { width: 20px; height: 20px; }
.footer-social a:hover { background: var(--cream); color: var(--forest); box-shadow: none; transform: translateY(-3px); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid rgba(247, 242, 234, .14); font-size: .86rem; }
.footer-bottom p { margin: 0; }
.footer .inline-link { color: var(--cream); text-decoration-color: rgba(247, 242, 234, .4); font-weight: 600; font-size: .86rem; }

/* =====================================================================
   TORNA SU (compare scorrendo; l'anello mostra quanto si e' letto)
   ===================================================================== */
.to-top {
  position: fixed; z-index: 41; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom));
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--forest); color: var(--cream); box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.8);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s, background .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { background: var(--coral); color: #fff; }
.to-top > .ico { width: 22px; height: 22px; transform: rotate(-90deg); transition: transform .3s var(--ease); }
.to-top:hover > .ico { transform: rotate(-90deg) translateX(3px); }
.to-top-ring { position: absolute; inset: -3px; width: 58px; height: 58px; transform: rotate(-90deg); pointer-events: none; }
.to-top-ring circle { fill: none; stroke-width: 3; }
.to-top-ring circle:first-child { stroke: transparent; }
.to-top-progress { stroke: var(--butter); stroke-linecap: round; stroke-dasharray: 163.4; stroke-dashoffset: calc(163.4 * (1 - var(--p, 0))); }
@media (min-width: 960px) { .to-top { right: 28px; bottom: 28px; } }

/* =====================================================================
   BARRA AZIONI (solo smartphone)
   ===================================================================== */
.actionbar {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 6px; padding: 6px;
  border-radius: 22px; background: rgba(31, 58, 43, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .45);
  transform: translateY(140%); transition: transform .45s var(--ease);
}
.actionbar.is-visible { transform: none; }
.actionbar > * {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 54px; border: 0; border-radius: 16px; background: transparent;
  color: var(--cream); text-decoration: none; font-size: .75rem; font-weight: 700;
}
.actionbar .ico { width: 22px; height: 22px; }
.actionbar-cta { background: var(--coral) !important; color: #fff !important; }
@media (min-width: 960px) { .actionbar { display: none; } }
@media (max-width: 959px) { .footer { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); } }

/* =====================================================================
   DIALOG (profili, contatto rapido, privacy)
   ===================================================================== */
dialog { padding: 0; border: 0; color: var(--ink); background: transparent; max-width: none; max-height: none; }
dialog:focus, dialog:focus-visible { outline: none; }
dialog::backdrop { background: rgba(16, 30, 22, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
/* entrata con leggero rimbalzo, uscita rapida (classe is-closing aggiunta dal JS prima di chiudere) */
dialog[open] { animation: dlgIn .6s cubic-bezier(.2, .9, .25, 1.08) both; }
dialog[open]::backdrop { animation: fadeIn .45s ease both; }
dialog.is-closing { animation: dlgOut .34s cubic-bezier(.5, 0, .75, 0) both; }
dialog.is-closing::backdrop { animation: fadeOut .34s ease both; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(44px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes dlgOut { to { opacity: 0; transform: translateY(26px) scale(.97); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes slideDown { to { transform: translateY(100%); } }

/* schede in basso (Chiama / WhatsApp) e profili su telefono: salgono dal basso e scendono chiudendo */
.sheet[open] { animation: slideUp .55s cubic-bezier(.2, .9, .3, 1.12) both; }
.sheet.is-closing { animation: slideDown .32s cubic-bezier(.5, 0, .75, 0) both; }
.sheet[open] .sheet-row { animation: rowIn .5s var(--ease) both; }
.sheet[open] .sheet-row:nth-of-type(1) { animation-delay: .12s; }
.sheet[open] .sheet-row:nth-of-type(2) { animation-delay: .2s; }
@keyframes rowIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (min-width: 640px) {
  .sheet[open] { animation: dlgIn .55s cubic-bezier(.2, .9, .25, 1.08) both; }
  .sheet.is-closing { animation: dlgOut .3s cubic-bezier(.5, 0, .75, 0) both; }
}
@media (max-width: 899px) {
  .profile[open]:not(.privacy) { animation: slideUp .6s cubic-bezier(.2, .8, .2, 1) both; }
  .profile.is-closing:not(.privacy) { animation: slideDown .36s cubic-bezier(.5, 0, .75, 0) both; }
}

/* dentro il profilo: la foto si svela, i contenuti arrivano in sequenza, la barra sale */
.profile[open] .profile-photo img { animation: photoIn 1.1s cubic-bezier(.7, 0, .2, 1) .1s both; }
@keyframes photoIn { from { clip-path: inset(0 0 100% 0); transform: scale(1.15); } to { clip-path: inset(0); transform: none; } }
.profile[open] .profile-body > * { animation: itemIn .7s var(--ease) both; }
.profile[open] .profile-body > :nth-child(1) { animation-delay: .2s; }
.profile[open] .profile-body > :nth-child(2) { animation-delay: .26s; }
.profile[open] .profile-body > :nth-child(3) { animation-delay: .32s; }
.profile[open] .profile-body > :nth-child(4) { animation-delay: .38s; }
.profile[open] .profile-body > :nth-child(5) { animation-delay: .44s; }
.profile[open] .profile-body > :nth-child(n+6) { animation-delay: .5s; }
@keyframes itemIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.profile[open] .profile-cta { animation: ctaIn .6s var(--ease) .45s both; }
@keyframes ctaIn { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
.profile[open] .dlg-close { animation: closeIn .5s var(--ease) .35s both; }
@keyframes closeIn { from { opacity: 0; transform: rotate(-90deg) scale(.6); } to { opacity: 1; transform: none; } }
.dlg-close { transition: rotate .3s var(--ease), background .3s; }
.dlg-close:hover { rotate: 90deg; background: #fff; }

body.has-dialog { overflow: hidden; }

.dlg-close {
  position: absolute; z-index: 3; right: 14px; top: 14px;
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--forest); box-shadow: var(--sh-sm);
}
.dlg-close .ico { width: 22px; height: 22px; }

/* bottom sheet */
.sheet { width: 100%; margin: auto 0 0; }
.sheet-in { position: relative; background: var(--cream); border-radius: 26px 26px 0 0; padding: 1.75rem 20px calc(1.5rem + env(safe-area-inset-bottom)); }
.sheet-in::before { content: ""; display: block; width: 44px; height: 5px; margin: -0.75rem auto 1.25rem; border-radius: 3px; background: var(--line); }
.sheet .h3 { margin-bottom: 1rem; padding-right: 3rem; }
.sheet-row {
  display: flex; align-items: center; gap: 1rem; padding: .75rem; margin-bottom: .6rem;
  border-radius: 18px; background: var(--white); color: var(--forest); text-decoration: none; box-shadow: var(--sh-sm);
}
.sheet-row img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.sheet-row span { display: flex; flex-direction: column; flex: 1; line-height: 1.35; font-size: .92rem; color: var(--ink-2); }
.sheet-row strong { color: var(--forest); font-size: 1rem; }
.sheet-row > .ico { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--coral); color: #fff; }
@media (min-width: 640px) {
  .sheet { width: min(460px, calc(100% - 32px)); margin: auto; }
  .sheet-in { border-radius: var(--r-xl); padding-bottom: 1.5rem; }
  .sheet-in::before { display: none; }
}

/* profilo */
.profile { width: 100%; height: 100%; margin: 0; }
.profile-in, .privacy-in {
  position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--cream);
}
.profile-in { display: flex; flex-direction: column; overflow: hidden; }
.profile-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.profile-photo { background: var(--sage-soft); }
.profile-photo img { width: 100%; max-height: 62vh; object-fit: cover; object-position: 50% 18%; }
.profile-body { padding: 1.75rem 20px 1.5rem; }
.profile-body h3 { font-size: 1.35rem; margin: 2rem 0 .9rem; padding-left: .9rem; border-left: 3px solid var(--coral); }
/* barra di prenotazione in fondo al profilo: fuori dall'area che scorre, quindi non copre mai il testo */
.profile-cta {
  display: flex; justify-content: flex-end; flex: 0 0 auto;
  padding: .85rem 20px calc(.85rem + env(safe-area-inset-bottom));
  background: var(--cream); border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .profile-cta { padding: 1rem 2.5rem; } }

.timeline { list-style: none; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: .6rem; bottom: .6rem; width: 2px; background: var(--sage); }
.timeline li { position: relative; padding: .35rem 0 .7rem 1.75rem; color: var(--ink-2); font-size: .96rem; }
.timeline li::before { content: ""; position: absolute; left: 0; top: .75rem; width: 14px; height: 14px; border-radius: 50%; background: var(--cream); box-shadow: inset 0 0 0 3px var(--green); }

@media (min-width: 900px) {
  .profile { width: min(1040px, calc(100% - 48px)); height: min(88vh, 860px); margin: auto; }
  .profile-in {
    display: grid; grid-template-columns: 340px 1fr; grid-template-rows: minmax(0, 1fr) auto;
    border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg);
  }
  .profile-scroll { display: contents; }
  .profile-photo { grid-row: 1 / span 2; height: 100%; }
  .profile-photo img { height: 100%; max-height: none; }
  .profile-body { grid-column: 2; overflow-y: auto; padding: 3rem 3rem 2rem; }
  .profile-cta { grid-column: 2; }
}

.privacy .privacy-in { padding: 3.5rem 20px calc(2rem + env(safe-area-inset-bottom)); }
.privacy h3 { font-size: 1.2rem; margin: 1.75rem 0 .5rem; }
.privacy ul { padding-left: 1.2rem; margin-bottom: 1rem; color: var(--ink-2); }
.privacy li { margin-bottom: .35rem; }
.privacy strong { color: var(--forest); }
@media (min-width: 900px) {
  .privacy { width: min(760px, calc(100% - 48px)); }
  .privacy .privacy-in { border-radius: var(--r-xl); padding: 3rem 3rem 2.5rem; box-shadow: var(--sh-lg); }
}


/* =====================================================================
   ANIMAZIONI
   ===================================================================== */

/* barra di avanzamento della lettura */
.progress {
  position: fixed; z-index: 60; inset: 0 0 auto; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--coral), var(--butter), var(--sage));
  transform-origin: left; transform: scaleX(0);
}

/* titoli: le parole salgono da una maschera */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .14em; margin-bottom: -.14em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: left bottom; transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms); }
.js [data-split].in .w > span { transform: none; }

/* foto: si aprono come un sipario */
.js [data-curtain] { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1); }
.js [data-curtain] > img { transform: scale(1.2); transition: transform 1.8s var(--ease); }
.js [data-curtain].in { clip-path: inset(-60px); }
.js [data-curtain].in > img { transform: none; }

/* piccola linea del sopratitolo che si allunga */
.js .kicker[data-reveal]::before { width: 0; transition: width .8s var(--ease) .35s; }
.js .kicker.in::before { width: 26px; }

/* piatto: entra ruotando */
.js .concept-media[data-reveal] .plate { transform: scale(.82) rotate(-40deg); transition: transform 1.6s var(--ease); }
.js .concept-media.in .plate { transform: none; }

/* inclinazione 3D con riflesso che segue il puntatore (solo mouse) */
@media (hover: hover) and (pointer: fine) {
  [data-tilt] {
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
    transition: transform .6s var(--ease), box-shadow .35s var(--ease);
  }
  [data-tilt].is-tilting { --ty: -6px; transition: transform .12s linear, box-shadow .35s var(--ease); }
  [data-tilt]::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .45), transparent 55%);
    opacity: 0; transition: opacity .35s;
  }
  [data-tilt].is-tilting::after { opacity: 1; }
  .contact-card, .card { position: relative; }
}

/* onde che ondeggiano sul bordo alto delle sezioni colorate */
.section, .footer { position: relative; overflow: hidden; overflow: clip; }
.section-sage::before, .section-cream::before, .footer::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 200%; height: clamp(26px, 4vw, 54px); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath fill='%23f7f2ea' d='M0 0h1200v22c-150 30-300 30-450 10S450 0 300 14 75 42 0 22Z'/%3E%3C/svg%3E") repeat-x 0 0 / 50% 100%;
  animation: wave 26s linear infinite;
}
.section-cream::before { animation-duration: 32s; animation-direction: reverse; }
.footer::before { animation-duration: 38s; }
@keyframes wave { to { transform: translateX(-50%); } }
.footer .wrap { position: relative; }

/* =====================================================================
   COMPARSA ALLO SCROLL (solo con JS attivo)
   ===================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js [data-reveal], .js [data-split] .w > span, .js [data-curtain], .js [data-curtain] > img, .js .signoff[data-write] { opacity: 1; transform: none; clip-path: none; }
  .morph span[aria-hidden] { position: static; opacity: 1; display: inline; }
  .morph span[aria-hidden] + span[aria-hidden]::before { content: " · "; }
  .morph { height: auto; font-size: clamp(1.8rem, 1.2rem + 3vw, 3rem); }
}
