/* =========================================================
   Dott.ssa Silvia Sarli — Biologa Nutrizionista
   Palette: #DCC5EB lilla · #F5EDE3 crema · #D8BDA9 sabbia
            #A9A08B salvia · #66534C cacao
   ========================================================= */

:root {
  --lilac: #DCC5EB;
  --lilac-soft: #EDE0F4;
  --cream: #F5EDE3;
  --cream-light: #FAF6F0;
  --sand: #D8BDA9;
  --sage: #A9A08B;
  --cocoa: #66534C;
  --cocoa-dark: #4A3C37;
  --violet: #9D6BC9; /* tono più intenso del lilla, solo per il monogramma */

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;

  --radius: 28px;
  --container: 1160px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--cocoa);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  color: var(--cocoa-dark);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.8rem, 6vw, 4.8rem); }
h2 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
h3 { font-size: 1.85rem; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--cocoa); }

p { margin: 0 0 1em; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }

.eyebrow {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1.1rem;
}

h1 .eyebrow {
  display: block;
  font-family: var(--sans);
  line-height: 1.5;
  letter-spacing: .22em;
  margin-bottom: 1.4rem;
}

.lead { font-size: 1.2rem; line-height: 1.65; }

.section { padding: clamp(80px, 11vw, 140px) 0; }
.section__head { text-align: center; margin-bottom: 56px; }
.section__intro { max-width: 46ch; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 15px 30px;
  border-radius: 999px;
  background: var(--cocoa);
  color: var(--cream-light);
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 400;
  letter-spacing: .04em;
  text-decoration: none;
  border: 1px solid var(--cocoa);
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { background: var(--cocoa-dark); transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.btn svg .fill, .footer__ig .fill { fill: currentColor; stroke: none; }
.btn--small { padding: 10px 22px; font-size: .88rem; }
.btn--outline { background: transparent; color: var(--cocoa); }
.btn--outline:hover { background: var(--cocoa); color: var(--cream-light); }
.btn--light { background: transparent; color: var(--cocoa-dark); border-color: var(--cocoa-dark); }
.btn--light:hover { background: var(--cocoa-dark); color: var(--cream-light); }
.btn--whatsapp { background: var(--cocoa-dark); border-color: var(--cocoa-dark); }

.link-arrow {
  font-size: .95rem;
  letter-spacing: .04em;
  text-decoration: none;
  border-bottom: 1px solid var(--sand);
  padding-bottom: 3px;
  transition: border-color .3s;
}
.link-arrow::after { content: " →"; transition: margin .3s var(--ease); }
.link-arrow:hover { border-color: var(--cocoa); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow .3s;
}
/*
  Lo sfondo sfocato sta su uno pseudo-elemento e non sull'header:
  un backdrop-filter sull'header farebbe da contenitore per il menu mobile (position: fixed),
  che resterebbe "schiacciato" nell'altezza dell'header invece di coprire lo schermo.
*/
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(250, 246, 240, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header.is-scrolled { box-shadow: 0 1px 0 rgba(102, 83, 76, .12); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }

.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
/* Monogramma: due S sovrapposte, la prima a contorno, la seconda piena con alone */
.logo__mark {
  position: relative;
  display: inline-block;
  font-size: 52px; /* tutte le misure sono in em: per ingrandire il logo basta cambiare questo valore */
  width: .96em;
  height: 1.12em;
  flex-shrink: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1;
}
.logo__mark span { position: absolute; }
.logo__mark span:first-child {
  left: 0; top: -.115em;
  color: transparent;
  -webkit-text-stroke: 1.3px var(--violet);
}
.logo__mark span:last-child {
  left: .29em; top: .23em;
  color: var(--violet);
  opacity: .88;
  text-shadow: 0 0 14px rgba(157, 107, 201, .45);
}
.logo__text {
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  padding-left: 14px;
  border-left: 1px solid var(--sand);
}

.nav { display: flex; align-items: center; gap: 34px; }
.nav a:not(.btn) {
  font-size: .92rem;
  text-decoration: none;
  position: relative;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 90px) 0 clamp(80px, 10vw, 130px); overflow: hidden; background: var(--cream-light); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.hero__text .lead { max-width: 30ch; margin: 1.4rem 0 2.4rem; }
.hero__actions { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }

.hero__media { position: relative; }
.hero__media::before {
  content: "";
  position: absolute;
  inset: 10% -9% -7% 14%;
  background: var(--lilac);
  border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
  z-index: 0;
  animation: morph 14s ease-in-out infinite alternate;
}

.photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.45), transparent 55%),
    linear-gradient(160deg, var(--sand), #C9AC97);
  z-index: 1;
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.photo__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  color: rgba(255,255,255,.85);
}
.photo--hero {
  aspect-ratio: 4 / 5;
  border-radius: 55% 45% 48% 52% / 45% 55% 45% 55%;
  animation: morph-alt 18s ease-in-out infinite alternate;
}
.photo--hero img { object-position: center 70%; }
.photo--blob img { object-position: center 20%; }

.heart { position: absolute; width: 34px; fill: none; stroke: var(--cocoa); stroke-width: 1.3; z-index: 2; }
.heart--1 { left: -22px; top: 58%; transform: rotate(-14deg); animation: float 6s ease-in-out infinite; }
.heart--2 { right: -14px; top: 64%; width: 28px; transform: rotate(12deg); animation: float 7s ease-in-out infinite reverse; }

/* ---------- About ---------- */
.about { background: var(--sand); }
.about p { color: var(--cocoa-dark); }
.about__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 8vw, 120px); align-items: center; }
.photo--blob {
  aspect-ratio: 4 / 5;
  border-radius: 58% 42% 50% 50% / 46% 52% 48% 54%;
  animation: morph 16s ease-in-out infinite alternate;
  box-shadow: 24px 24px 0 var(--cream-light);
}
.about__text p { max-width: 54ch; }
.about__sign {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--cocoa-dark);
  margin-top: 1.6rem;
}

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: var(--cream-light);
  border-radius: var(--radius);
  padding: 44px 38px 46px;
  border: 1px solid rgba(169, 160, 139, .35);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -28px rgba(102, 83, 76, .35); }
.card--accent { background: var(--lilac); border-color: transparent; }
.card__num {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--sage);
  margin-bottom: 26px;
}
.card--accent .card__num { color: var(--cocoa); }
.card h3 { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid rgba(102, 83, 76, .2); }
.card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.card li { position: relative; padding-left: 22px; }
.card li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sand);
}
.card--accent li::before { background: var(--cocoa); }
.card small { font-size: .88em; opacity: .75; }
.mini-heart { color: var(--cocoa); }

/* ---------- Instagram ---------- */
.insta { background: var(--cocoa); color: var(--cream); overflow: hidden; }
.insta .eyebrow { color: var(--lilac); }
.insta h2, .insta h2 a { color: var(--cream-light); }
.insta .lead em { color: var(--lilac); }
.insta .btn--outline { color: var(--cream-light); border-color: rgba(245, 237, 227, .6); }
.insta .btn--outline:hover { background: var(--cream-light); color: var(--cocoa-dark); }
.insta__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.insta h2 a { text-decoration: none; font-size: .82em; font-style: italic; }
.insta h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.insta .lead { margin: 1.2rem 0 2.2rem; max-width: 34ch; }

/* Reel: due "schermi" verticali leggermente ruotati, con una macchia lilla dietro */
.reels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 34px);
  max-width: 560px;
  margin-inline: auto;
  width: 100%;
  padding: 20px 0 40px;
}
.reels::before {
  content: "";
  position: absolute;
  inset: 12% 6% 4% 10%;
  background: var(--lilac);
  opacity: .35;
  border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
  animation: morph 14s ease-in-out infinite alternate;
  filter: blur(2px);
}
.reel { position: relative; }
.reel--2 { margin-top: 64px; }
.reel__frame {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 26px;
  background: var(--cocoa-dark);
  border: 6px solid var(--cream-light);
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .55);
  transform: rotate(-3deg);
  transition: transform .5s var(--ease);
}
.reel--2 .reel__frame { transform: rotate(3deg); }
.reel:hover .reel__frame { transform: rotate(0) scale(1.03); }
/*
  Il player di Instagram ha un'intestazione di 54px e mostra il video 9:16
  centrato in un riquadro 4:5: lo ingrandiamo e spostiamo così che resti visibile solo il video.
*/
.reel__frame iframe {
  position: absolute;
  top: -54px;
  left: -21.11%;
  width: 142.22%;
  height: calc(100% + 454px);
  border: 0;
}

/* ---------- CTA ---------- */
.cta { background: var(--lilac); text-align: center; position: relative; overflow: hidden; }
.cta::before, .cta::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--lilac-soft);
  opacity: .6;
}
.cta::before { width: 380px; height: 380px; left: -120px; top: -140px; }
.cta::after { width: 300px; height: 300px; right: -90px; bottom: -150px; }
.cta__inner { position: relative; z-index: 1; max-width: 820px; }
.cta h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.cta .lead { margin: 1.4rem auto 2.6rem; }
.cta__actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Where ---------- */
.where__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.where__map {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand);
  box-shadow: -24px 24px 0 var(--sage);
}
.where__map iframe { width: 100%; height: 100%; border: 0; filter: sepia(.25) saturate(.8); }
address {
  font-style: normal;
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.3;
  color: var(--cocoa-dark);
  margin: 1.2rem 0 1.4rem;
  padding-left: 22px;
  border-left: 2px solid var(--lilac);
}
address span { display: block; }
.where__note { max-width: 36ch; margin-bottom: 1.8rem; }
.hours { margin: 0 0 1.2rem; display: grid; gap: 6px; max-width: 340px; }
.hours div { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 6px; border-bottom: 1px dashed rgba(169, 160, 139, .5); }
.hours dt { font-weight: 400; }
.hours dd { margin: 0; }
.where__contact a { font-family: var(--serif); font-size: 1.4rem; color: var(--cocoa-dark); text-decoration: none; }
.where__contact a::before { content: "Tel. "; font-family: var(--sans); font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; color: var(--sage); }

/* ---------- Footer ---------- */
.footer { background: var(--cocoa); color: var(--cream); padding: 64px 0 28px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 18px; }
/* Nel footer il monogramma è più grande e "acceso", come nel logo originale su fondo scuro */
.footer__brand { gap: 26px; }
.footer__brand .logo__mark { font-size: 96px; }
.footer__brand .logo__mark span:first-child {
  -webkit-text-stroke: 1.6px var(--lilac);
  filter: drop-shadow(0 0 6px rgba(220, 197, 235, .55));
}
.footer__brand .logo__mark span:last-child {
  color: var(--lilac);
  opacity: .92;
  text-shadow: 0 0 18px rgba(220, 197, 235, .7), 0 0 40px rgba(190, 140, 230, .45);
}
.footer__brand div { display: flex; flex-direction: column; line-height: 1.4; }
.footer__brand strong { font-weight: 400; font-family: var(--serif); font-size: 1.3rem; }
.footer__brand div span { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.footer__legal { display: flex; flex-direction: column; font-size: .85rem; opacity: .8; }
.footer__legal a { text-decoration: none; }
.footer__legal a:hover { text-decoration: underline; }
.footer__ig {
  width: 48px; height: 48px;
  border: 1px solid rgba(245,237,227,.4);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background .3s, color .3s;
}
.footer__ig:hover { background: var(--cream); color: var(--cocoa); }
.footer__ig svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(245,237,227,.15);
  font-size: .8rem;
}
.footer__bottom p { margin: 0; opacity: .6; }
.footer__bottom .footer__credit { display: flex; align-items: center; gap: 10px; opacity: .85; letter-spacing: .03em; }
.footer__credit img { width: 26px; height: 26px; border-radius: 7px; }
.footer__credit strong { font-weight: 500; }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--cocoa);
  color: var(--cream);
  display: none;
  place-items: center;
  box-shadow: 0 10px 30px -8px rgba(74, 60, 55, .5);
  z-index: 60;
}
.wa-float svg { width: 28px; }
.wa-float .fill { fill: currentColor; }

/* ---------- Animations ---------- */
/* Le animazioni di comparsa si attivano solo con JavaScript attivo: senza JS (o per i crawler) il contenuto resta visibile */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes morph {
  0%   { border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; }
  50%  { border-radius: 58% 42% 55% 45% / 44% 56% 44% 56%; }
  100% { border-radius: 42% 58% 48% 52% / 56% 46% 54% 44%; }
}
@keyframes morph-alt {
  0%   { border-radius: 55% 45% 48% 52% / 45% 55% 45% 55%; }
  50%  { border-radius: 44% 56% 58% 42% / 54% 42% 58% 46%; }
  100% { border-radius: 52% 48% 40% 60% / 48% 58% 42% 52%; }
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .insta__grid, .where__grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer;
    position: relative; z-index: 70;
  }
  .nav-toggle span { display: block; width: 26px; height: 1.5px; background: var(--cocoa-dark); margin-left: auto; transition: transform .35s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

  .logo { position: relative; z-index: 70; }

  .nav {
    position: fixed;
    inset: 0;
    height: 100vh;
    height: 100dvh;
    padding: 100px 24px 40px;
    overflow-y: auto;
    background: var(--cream-light);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
    z-index: 60;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav .btn { margin-top: 14px; }
  body.menu-open { overflow: hidden; }
  body.menu-open .wa-float { display: none; }
  .nav a:not(.btn) { font-family: var(--serif); font-size: 2rem; color: var(--cocoa-dark); }

  .hero__grid, .about__grid { grid-template-columns: 1fr; }
  .hero__media { max-width: 420px; margin: 0 auto; width: 88%; }
  .about__media { max-width: 360px; margin: 0 auto; width: 85%; }
  .wa-float { display: grid; }
}

@media (max-width: 520px) {
  .logo__text { display: none; }
  .reel--2 { margin-top: 40px; }
  .reel__frame { border-width: 4px; border-radius: 20px; }
  .card { padding: 36px 28px; }
  .cta__actions .btn { width: 100%; justify-content: center; }
}
