/* ===== Home: hero animata ===== */
#ph{position:relative;overflow:hidden;isolation:isolate;background:linear-gradient(135deg,#FBF6EC 0%,#EAF3EC 55%,#F7E7CF 100%);background-size:200% 200%;animation:p-flow 20s ease-in-out infinite}
#ph .ph-bg{position:absolute;inset:0;z-index:-1;overflow:hidden}
.ph-blob{position:absolute;border-radius:50%;filter:blur(60px);opacity:.7;will-change:transform}
.ph-blob.b1{width:520px;height:520px;left:-120px;top:-100px;background:radial-gradient(circle,#9CCBB8,transparent 70%);animation:ph-drift1 16s ease-in-out infinite}
.ph-blob.b2{width:600px;height:600px;right:-160px;top:10%;background:radial-gradient(circle,#F6CFA0,transparent 70%);animation:ph-drift2 19s ease-in-out infinite}
.ph-blob.b3{width:460px;height:460px;left:35%;bottom:-200px;background:radial-gradient(circle,#CFE4F0,transparent 70%);animation:ph-drift1 22s ease-in-out infinite reverse}
.ph-dot{position:absolute;border-radius:50%;background:rgba(47,111,106,.18)}
.ph-dot.d1{width:16px;height:16px;left:8%;top:62%;animation:p-float 7s ease-in-out infinite}
.ph-dot.d2{width:26px;height:26px;left:46%;top:14%;background:rgba(184,90,54,.22);animation:p-float2 9s ease-in-out infinite}
.ph-dot.d3{width:12px;height:12px;right:12%;bottom:30%;animation:p-float 8s ease-in-out infinite .8s}
.ph-dot.d4{width:20px;height:20px;right:30%;top:8%;background:rgba(243,217,177,.9);animation:p-float2 6s ease-in-out infinite}
@keyframes ph-drift1{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(90px,60px) scale(1.15)}}
@keyframes ph-drift2{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(-80px,50px) scale(.9)}}
@keyframes ph-morph{0%,100%{border-radius:58% 42% 38% 62%/52% 38% 62% 48%}33%{border-radius:42% 58% 56% 44%/40% 58% 42% 60%}66%{border-radius:50% 50% 34% 66%/60% 46% 54% 40%}}
@keyframes ph-spin{to{transform:rotate(360deg)}}
@keyframes ph-rise{from{transform:translateY(115%) rotate(4deg);opacity:0}to{transform:none;opacity:1}}
@keyframes ph-fade{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@keyframes ph-pop{from{opacity:0;transform:scale(.6)}to{opacity:1;transform:none}}
@keyframes ph-scroll{to{transform:translateX(-33.333%)}}
@keyframes p-kenburns{from{transform:scale(1.02)}to{transform:scale(1.14) translate(-2%,2%)}}

.ph-wrap{max-width:1180px;margin:0 auto;padding:120px 24px 50px;display:grid;grid-template-columns:1.1fr .9fr;gap:40px;align-items:center;min-height:62vh}
.ph-eyebrow{display:inline-block;padding:8px 18px;border-radius:999px;background:rgba(255,255,255,.7);backdrop-filter:blur(6px);color:#2F6F6A;font-weight:700;font-size:15px;box-shadow:0 4px 18px rgba(47,111,106,.12);animation:ph-fade .8s ease both}
#ph .ph-title{margin:22px 0 0;padding:0;font-size:clamp(44px,6.4vw,84px);line-height:1.04;background:none!important;-webkit-text-fill-color:currentColor;color:#1F4A47!important;font-weight:600}
.ph-title .w{display:inline-block;overflow:hidden;vertical-align:top;padding:.04em .06em .12em}
.ph-title .w>span{display:inline-block;animation:ph-rise 1s cubic-bezier(.2,.8,.2,1) both}
.ph-title .w:nth-child(1)>span{animation-delay:.25s}.ph-title .w:nth-child(2)>span{animation-delay:.45s}.ph-title .w:nth-child(3)>span{animation-delay:.65s}
.ph-grad{background:linear-gradient(100deg,#2F6F6A,#4A8C7E 40%,#C8663F 80%,#2F6F6A);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;animation:ph-rise 1s cubic-bezier(.2,.8,.2,1) .65s both,p-flow 7s ease-in-out 1.7s infinite}
.ph-lead{max-width:540px;margin:22px 0 0;font-size:19px;line-height:1.7;color:#3B4948;animation:ph-fade .9s ease 1s both}
.ph-cta{display:flex;flex-wrap:wrap;gap:14px;margin-top:30px;animation:ph-fade .9s ease 1.2s both}
.ph-btn{position:relative;overflow:hidden;display:inline-block;padding:15px 30px;border-radius:999px;background:linear-gradient(135deg,#C8663F,#B85A36 55%,#9A4627);color:#fff!important;font-weight:700;font-size:17px;text-decoration:none;box-shadow:0 8px 22px rgba(154,70,39,.3);transition:transform .25s,box-shadow .25s}
.ph-btn:hover{transform:translateY(-3px) scale(1.04);color:#fff!important}
.ph-btn:after{content:"";position:absolute;top:0;left:0;width:40%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);transform:translateX(-120%) skewX(-20deg)}
.ph-btn:hover:after{animation:p-sheen .9s ease}
.ph-btn.ph-ghost{background:rgba(255,255,255,.75);color:#1F4A47!important;box-shadow:0 6px 18px rgba(47,111,106,.15)}

.ph-visual{position:relative;aspect-ratio:1/1;max-width:480px;width:100%;margin:0 auto;animation:ph-pop 1s cubic-bezier(.2,.8,.2,1) .5s both}
.ph-photo{position:absolute;inset:7%;overflow:hidden;animation:ph-morph 14s ease-in-out infinite;box-shadow:0 30px 60px rgba(31,74,71,.28)}
.ph-photo img{width:100%;height:100%;object-fit:cover;display:block;border-radius:0!important;animation:p-kenburns 18s ease-in-out infinite alternate}
.ph-ring{position:absolute;border-radius:50%;border:2px dashed rgba(47,111,106,.4)}
.ph-ring.r1{inset:0;animation:ph-spin 40s linear infinite}
.ph-ring.r2{inset:-6%;border-color:rgba(184,90,54,.35);animation:ph-spin 60s linear infinite reverse}
.ph-chip{position:absolute;padding:10px 18px;border-radius:999px;background:#fff;color:#1F4A47;font-weight:700;font-size:14px;white-space:nowrap;box-shadow:0 10px 26px rgba(31,74,71,.18)}
.ph-chip.c1{left:-8%;top:16%;animation:p-float 7s ease-in-out infinite}
.ph-chip.c2{right:-6%;top:46%;animation:p-float2 8s ease-in-out infinite}
.ph-chip.c3{left:6%;bottom:6%;animation:p-float 9s ease-in-out infinite 1s}

/* spazzolino che spazzola il dente */
.ph-brush{position:absolute;right:-8%;bottom:-8%;width:52%;aspect-ratio:220/200;filter:drop-shadow(0 12px 18px rgba(31,74,71,.28));animation:p-float2 6s ease-in-out infinite}
.ph-brush .brush{transform-box:fill-box;transform-origin:30% 50%;animation:ph-brushing 1.1s ease-in-out infinite}
.ph-brush .tooth{animation:ph-wiggle 1.1s ease-in-out infinite;transform-box:fill-box;transform-origin:50% 100%}
.ph-brush .bubbles circle{transform-box:fill-box;transform-origin:center;opacity:0;animation:ph-bubble 2.2s ease-in infinite}
.ph-brush .bb2{animation-delay:.6s!important}.ph-brush .bb3{animation-delay:1.2s!important}
.ph-brush .spark path{transform-box:fill-box;transform-origin:center;animation:ph-twinkle 1.6s ease-in-out infinite}
.ph-brush .s2{animation-delay:.8s!important}
@keyframes ph-brushing{0%,100%{transform:translateX(-10px) rotate(-4deg)}50%{transform:translateX(18px) rotate(4deg)}}
@keyframes ph-wiggle{0%,100%{transform:rotate(-1deg)}50%{transform:rotate(1.2deg)}}
@keyframes ph-bubble{0%{opacity:0;transform:translateY(10px) scale(.4)}25%{opacity:1}100%{opacity:0;transform:translateY(-34px) scale(1.4)}}
@keyframes ph-twinkle{0%,100%{opacity:.2;transform:scale(.5) rotate(0)}50%{opacity:1;transform:scale(1.2) rotate(30deg)}}

.ph-marquee{overflow:hidden;background:linear-gradient(90deg,#1F4A47,#2F6F6A,#4A8C7E);padding:16px 0;transform:rotate(-1.2deg);margin:0 -2%;box-shadow:0 10px 30px rgba(31,74,71,.2)}
.ph-track{display:flex;width:max-content;animation:ph-scroll 28s linear infinite}
.ph-track span{color:#fff;font-family:Fraunces,Georgia,serif;font-size:22px;padding:0 34px;white-space:nowrap;position:relative}
.ph-track span:after{content:"✦";color:#F3D9B1;position:absolute;right:-6px}
.ph-marquee:hover .ph-track{animation-play-state:paused}

.ph-stats{max-width:1100px;margin:0 auto;padding:60px 24px 70px;display:grid;grid-template-columns:repeat(4,1fr);gap:20px;text-align:center}
.ph-stats>div{padding:22px 10px;border-radius:24px;background:rgba(255,255,255,.65);backdrop-filter:blur(6px);transition:transform .35s,box-shadow .35s}
.ph-stats>div:hover{transform:translateY(-8px);box-shadow:0 16px 34px rgba(47,111,106,.18)}
.ph-stats b{display:block;font-family:Fraunces,Georgia,serif;font-size:56px;line-height:1;background:linear-gradient(135deg,#2F6F6A,#C8663F);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.ph-stats small{display:block;margin-top:10px;font-size:15px;color:#3B4948}

/* barra di avanzamento e sottolineatura animata dei titoli */
#p-progress{position:fixed;left:0;top:0;height:4px;width:0;z-index:100000;background:linear-gradient(90deg,#4A8C7E,#F3D9B1,#C8663F)}
.et-l--post .et_pb_text h2{position:relative}
.et-l--post .et_pb_text h2:after{content:"";display:block;height:4px;width:0;margin-top:8px;border-radius:4px;background:linear-gradient(90deg,#4A8C7E,#C8663F);transition:width 1s ease .3s}
.et-l--post .p-in h2:after{width:70px}

@media(max-width:900px){
  .ph-wrap{grid-template-columns:1fr;padding:110px 20px 40px;min-height:0;text-align:center}
  .ph-lead{margin-left:auto;margin-right:auto}.ph-cta{justify-content:center}
  .ph-visual{max-width:340px;margin-top:20px}.ph-chip.c1{left:-4%}.ph-chip.c2{right:-4%}
  .ph-stats{grid-template-columns:repeat(2,1fr)}.ph-stats b{font-size:44px}
}
@media(prefers-reduced-motion:reduce){#ph,#ph *{animation:none!important}.ph-title .w>span{opacity:1}}

/* hero a tutta larghezza dentro Divi */
.et_pb_section_0 .et_pb_row,.et_pb_section_0 .et_pb_row .et_pb_column,.et_pb_section_0 .et_pb_code,.et_pb_section_0 .et_pb_code_inner{width:100%!important;max-width:100%!important;padding:0!important;margin:0!important}
.et_pb_section_0{padding:0!important;background:none!important}
#ph{width:100vw;margin-left:calc(50% - 50vw)}

/* foto originale dell'insegna come sfondo; la foto famiglia resta nella sezione "Lo studio" */
#ph .ph-bg:before{content:"";position:absolute;inset:-4%;background:url(/wp-content/uploads/2024/10/DSF1857.jpg) center right/cover no-repeat;animation:p-kenburns 24s ease-in-out infinite alternate}
#ph .ph-bg:after{content:"";position:absolute;inset:0;background:linear-gradient(95deg,rgba(251,246,236,.97) 0%,rgba(251,246,236,.9) 38%,rgba(234,243,236,.45) 70%,rgba(234,243,236,.15) 100%)}
#ph .ph-bg>i{z-index:1}
#ph .ph-photo,#ph .ph-ring{display:none}
#ph .ph-visual{min-height:380px}
#ph .ph-brush{right:4%;bottom:6%;width:62%}
