/* Fixed-size carousel keeps the page still while three messages change. */
.story-chat.carousel-ready .chat-slides{display:grid}
.story-chat.carousel-ready .chat-messages{grid-area:1/1;align-content:start}
.story-chat.carousel-ready .chat-messages[hidden]{display:grid;visibility:hidden;pointer-events:none}
#stories .chat-draft-note{grid-column:1/-1;font:12px/1.6 var(--sans);color:#795c4e;margin:0 0 1px}
.chat-controls{padding:12px 20px;border-top:1px solid #d8c7bc;display:flex;gap:12px;align-items:center;background:#f8f1ea}
.chat-controls[hidden]{display:none}
.chat-pages{display:flex;gap:6px}
.chat-pages button,.chat-pause{background:transparent;border:1px solid transparent;border-radius:20px;min-width:36px;min-height:36px;padding:5px 9px;font:12px/1.5 var(--sans);color:#70594f}
.chat-pages button[aria-current]{background:#8c736f;color:#fffaf5}
.chat-pause{margin-left:auto;border-color:#cbb5a8}
.chat-page-status{font:11px/1.5 var(--sans);letter-spacing:1px;color:#967969}
/* Existing pearl image on a separate layer; text and layout never move. */
.pearl-motion{position:absolute;inset:26px 0 auto;height:1150px;overflow:hidden;z-index:-1;pointer-events:none}
body{isolation:isolate;background-image:none}
.pearl-motion:before{content:'';position:absolute;inset:-4%;background:url('assets/pearl-background.png') center top/100% auto no-repeat;transform-origin:50% 70%;animation:pearl-flow 13s ease-in-out infinite alternate}
.sunlight-drift,.leaf-shadow-drift{position:absolute;inset:-15%;pointer-events:none;z-index:0;opacity:.45}
.sunlight-drift{background:linear-gradient(115deg,transparent 25%,#fff5d69c 43%,transparent 61%);mix-blend-mode:soft-light;animation:sunlight-flow 10s ease-in-out infinite alternate}
.leaf-shadow-drift{background:repeating-linear-gradient(117deg,transparent 0 12%,#5a493c25 14%,transparent 19% 27%);filter:blur(12px);mix-blend-mode:multiply;opacity:.25;animation:shadow-sway 9s ease-in-out infinite alternate}
#about .about-visual>p,#about .about-visual>h2{position:relative;z-index:1}
#about .about-mood-image{animation:still-life-breathe 16s ease-in-out infinite alternate;transform-origin:55% 70%}
@keyframes pearl-flow{from{transform:translate(-1.5%,0) scale(1)}to{transform:translate(1.5%,-2%) scale(1.06)}}
@keyframes sunlight-flow{from{transform:translateX(-18%) rotate(-7deg);opacity:.25}to{transform:translateX(20%) rotate(6deg);opacity:.6}}
@keyframes shadow-sway{from{transform:translate(-3%,-2%) rotate(-5deg)}to{transform:translate(4%,2%) rotate(5deg)}}
@keyframes still-life-breathe{from{transform:scale(1)}to{transform:scale(1.035)}}
.motion-toggle{position:fixed;left:12px;bottom:12px;z-index:8;background:#fff9f0eb;border:1px solid #d5c4b9;border-radius:20px;color:#715b50;padding:7px 11px;font:11px/1.4 var(--sans);box-shadow:0 2px 10px #65432b0c}
.motion-toggle[hidden]{display:none}
body.motion-paused *,body.motion-paused *:before,body.motion-paused *:after{animation-play-state:paused!important}
@media(max-width:760px){
 .pearl-motion{height:1050px}
 .pearl-motion:before{background-size:auto 1050px}
 #stories .chat-controls{padding:10px 16px;gap:8px}
 #stories .chat-message-text{font-size:14px;line-height:1.85}
}
@media(prefers-reduced-motion:reduce){
 .pearl-motion:before,.sunlight-drift,.leaf-shadow-drift,#about .about-mood-image{animation:none!important;transform:none!important}
 .sunlight-drift,.leaf-shadow-drift{display:none}
}

body.motion-paused #treatments .treatment-content{animation:none!important}
@media(min-width:761px){
 #stories .chat-messages .chat-message{margin:0;align-self:start;max-width:100%;width:100%}
}

/* Independent bubble drift uses translate, leaving entrance transforms separate. */
@media(prefers-reduced-motion:no-preference){
 .story-chat .chat-message{--drift-x:5px;--drift-y:7px;animation:chat-float 6.8s ease-in-out infinite;translate:0 0}
 .story-chat .chat-message:nth-of-type(2){animation-duration:7.6s;animation-delay:-2.4s;--drift-x:-5px;--drift-y:6px}
 .story-chat .chat-message:nth-of-type(3){animation-duration:8.4s;animation-delay:-4.1s;--drift-x:4px;--drift-y:8px}
 .story-chat:not(.chat-inview) .chat-message,.story-chat .chat-messages[hidden] .chat-message,.story-chat:focus-within .chat-message{animation-play-state:paused}
 @keyframes chat-float{0%,100%{translate:0 0}25%{translate:var(--drift-x) calc(-1 * var(--drift-y))}50%{translate:0 calc(-.4 * var(--drift-y))}75%{translate:calc(-1 * var(--drift-x)) calc(.35 * var(--drift-y))}}
}
@media(hover:hover){.story-chat:hover .chat-message{animation-play-state:paused}}
@media(max-width:760px){
 .story-chat .chat-message,.story-chat .chat-message:nth-of-type(2),.story-chat .chat-message:nth-of-type(3){--drift-x:2px;--drift-y:3px}
}

/* More visible drift; hovering one card leaves its neighbours moving. */
@media(prefers-reduced-motion:no-preference){
 .story-chat .chat-message{--drift-x:9px;--drift-y:14px;animation-duration:4.8s}
 .story-chat .chat-message:nth-of-type(2){--drift-x:-8px;--drift-y:12px;animation-duration:5.6s}
 .story-chat .chat-message:nth-of-type(3){--drift-x:7px;--drift-y:15px;animation-duration:5.2s}
}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
 .story-chat.chat-inview:hover .chat-messages:not([hidden]) .chat-message{animation-play-state:running}
 .story-chat.chat-inview:hover .chat-messages:not([hidden]) .chat-message:hover,.story-chat.chat-inview:focus-within .chat-message{animation-play-state:paused}
}
@media(max-width:760px){
 .story-chat .chat-message,.story-chat .chat-message:nth-of-type(2),.story-chat .chat-message:nth-of-type(3){--drift-x:4px;--drift-y:7px}
}

/* Original approved pearl artwork, repeated through every main section. */
.pearl-motion,.ambient-waves{display:none}
body{background:var(--paper) url('assets/pearl-background.png') center 26px/100% auto no-repeat}
section,.site-header,.care-band{position:relative;isolation:isolate}
#about,#treatments,#stories,#studio,#social,#pending{
 background-color:#faf6ef;
 background-image:url('assets/pearl-background.png');
 background-size:100% auto;
 background-position:center top;
 background-repeat:repeat-y;
}
#about:before,#treatments:before,#stories:before,.care-band:before{display:none}
.care-band{background:#f1e6dd url('assets/pearl-background.png') center 82%/cover}
#contact{
 background-image:linear-gradient(#806862eb,#806862eb),url('assets/pearl-background.png');
 background-size:100% 100%,100% auto;
 background-position:center,center top;
 background-repeat:no-repeat,repeat-y;
}
@media(max-width:760px){
 body{background-size:auto 1050px}
 #about,#treatments,#stories,#studio,#social,#pending{background-size:100% 720px}
 #contact{background-size:100% 100%,100% 720px}
}

/* Opening colour wash: dusty rose and champagne over the original pearl silk. */
body{
 background-image:radial-gradient(ellipse at 0% 20%,#d3acb480 0%,#e5c8c43b 35%,transparent 65%),radial-gradient(ellipse at 100% 58%,#d9b68b73 0%,#ecd6b936 37%,transparent 65%),url('assets/pearl-background.png');
 background-size:100% 950px,100% 950px,100% auto;
 background-position:center 26px;
 background-repeat:no-repeat;
}
@media(max-width:760px){
 body{background-size:100% 1050px,100% 1050px,auto 1050px}
}

/* One continuous silk canvas behind the header, hero and closing line. */
body{position:relative;background:var(--paper)}
.pearl-motion{
 display:block;top:var(--opening-top,0px);height:var(--opening-height,1000px);
 background:#f7eee7;isolation:isolate;
}
.pearl-motion:before{
 inset:-4%;opacity:1;
 background:radial-gradient(ellipse at 0% 20%,#d3acb44a,transparent 65%),radial-gradient(ellipse at 100% 58%,#d9b68b40,transparent 65%),url('assets/pearl-background.png') center/100% 100% no-repeat;
 animation:opening-silk-drift 10s ease-in-out infinite alternate;
 transform-origin:center;
}
.pearl-motion:after{
 content:'';position:absolute;inset:-4%;pointer-events:none;opacity:.38;
 background:url('assets/pearl-background.png') center/100% 100% no-repeat;
 transform:rotate(180deg) scale(1.04);
 mask-image:linear-gradient(90deg,#000 0%,#000c 32%,#0005 65%,transparent 100%);
 animation:opening-silk-return 13s ease-in-out infinite alternate;
}
.care-band{background:transparent;border-top:0}
@keyframes opening-silk-drift{
 from{transform:translate(-2%,-1%) scale(1.025)}
 to{transform:translate(2%,1.5%) scale(1.07)}
}
@keyframes opening-silk-return{
 from{transform:rotate(180deg) translate(-1.8%,-.5%) scale(1.04);opacity:.42}
 to{transform:rotate(180deg) translate(1.8%,1.5%) scale(1.09);opacity:.6}
}
@media(prefers-reduced-motion:reduce){
 .pearl-motion:before,.pearl-motion:after{animation:none!important}
}

/* A faint third silk fold gives the left side a little more depth. */
.pearl-motion .silk-depth{position:absolute;inset:-5%;z-index:1;pointer-events:none;opacity:.22;background:url('assets/pearl-background.png') left bottom/100% 150% no-repeat;mask-image:linear-gradient(90deg,#000, #0008 45%,transparent 80%);animation:silk-depth-drift 18s ease-in-out infinite alternate}
@keyframes silk-depth-drift{from{transform:translate(-1%,1%) scale(1.02)}to{transform:translate(1.5%,-1%) scale(1.055)}}
@media(prefers-reduced-motion:reduce){.pearl-motion .silk-depth{animation:none!important}}

/* Feather the section artwork into one ivory ground, without page-like edges. */
#about,#treatments,#stories,#studio,#social,#pending{
 border-top:0;border-bottom:0;
 background-color:#faf6ef;
 background-image:linear-gradient(to bottom,#faf6ef 0, #faf6ef00 110px, #faf6ef00 calc(100% - 110px),#faf6ef 100%),url('assets/pearl-background.png');
 background-size:100% 100%,100% auto;
 background-position:center,center top;
 background-repeat:no-repeat,repeat-y;
}
@media(max-width:760px){
 #about,#treatments,#stories,#studio,#social,#pending{
  background-image:linear-gradient(to bottom,#faf6ef 0,#faf6ef00 85px,#faf6ef00 calc(100% - 85px),#faf6ef 100%),url('assets/pearl-background.png');
  background-size:100% 100%,100% 720px;
 }
}

/* Mobile viewport completion, layered silk and robust animated-image clipping. */
.pearl-motion:before{animation-duration:3.5s}
.pearl-motion:after{animation-duration:4.5s}
.pearl-motion .silk-depth{animation-duration:6s}
.pearl-motion .silk-ribbon{position:absolute;inset:-8%;pointer-events:none;z-index:2;background:url('assets/pearl-background.png') center/100% 125% no-repeat;opacity:.2;animation:silk-ribbon-flow 5s ease-in-out infinite alternate;mask-image:linear-gradient(90deg,#000,transparent 72%)}
.pearl-motion .silk-ribbon-two{background-position:center bottom;opacity:.16;mask-image:linear-gradient(270deg,#000,transparent 75%);animation:silk-ribbon-counter 6.5s ease-in-out infinite alternate}
@keyframes silk-ribbon-flow{from{transform:translate(-3%,3%) rotate(-8deg) scale(1.04)}to{transform:translate(2%,-2%) rotate(-4deg) scale(1.09)}}
@keyframes silk-ribbon-counter{from{transform:translate(2%,-2%) rotate(172deg) scale(1.04)}to{transform:translate(-2%,2%) rotate(179deg) scale(1.08)}}
#about .about-visual{overflow:hidden;isolation:isolate;clip-path:inset(0 round 100px 4px 56px 4px);border-radius:100px 4px 56px 4px;transform:translateZ(0)}
#about,#treatments,#stories,#studio,#social,#pending{background-repeat:no-repeat;background-size:100% 100%,100% 100%}
#contact{background-repeat:no-repeat;background-size:100% 100%,100% 100%;border-top:0;border-bottom:0;background-image:linear-gradient(to bottom,#faf6ef 0,#806862eb 100px,#806862eb calc(100% - 100px),#faf6ef 100%),url('assets/pearl-background.png')}
.care-band{background:linear-gradient(to bottom,transparent 45%,#faf6ef 100%)}
footer{background:#faf6ef;border-top:0}
@media(max-width:760px){
 .care-band{min-height:calc(100svh - var(--opening-before-band,650px));display:flex;align-items:center;justify-content:center;padding-bottom:max(15px,env(safe-area-inset-bottom))}
 #about .about-visual{border-radius:76px 5px 48px 5px;clip-path:inset(0 round 76px 5px 48px 5px);-webkit-mask-image:-webkit-radial-gradient(white,black)}
}
@media(prefers-reduced-motion:reduce){.pearl-motion .silk-ribbon{animation:none!important}}

/* Carol's supplied photos: preserve pixels, show the personal story side by side. */
#stories #carol-story{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
#carol-story .carol-photo-pair{grid-column:1;grid-row:1/4;display:grid;grid-template-columns:.86fr 1fr;gap:16px;align-items:start}
#carol-story .carol-photo-pair figure{margin:0;min-width:0}
#carol-story .carol-then{padding-top:45px}
#carol-story .carol-photo-window{position:relative;overflow:hidden;aspect-ratio:440/524;border-radius:3px 46px 3px 3px}
#carol-story .carol-then .carol-photo-window{border-radius:46px 3px 3px 3px}
#carol-story .carol-photo-window img{position:absolute;display:block;width:245.454546%;max-width:none;height:auto;top:-79.389313%;left:-128.409091%;border-radius:0;transform:none}
#carol-story .carol-then img{left:-17.5%}
#carol-story .carol-photo-pair figcaption{padding-top:12px;font:15px/1.6 var(--sans);color:#675249}
#carol-story .carol-photo-pair figcaption small{display:block;font-size:10px;letter-spacing:1.5px;margin-bottom:3px;color:#927267}
#studio .map-touch-note{font:13px/1.6 var(--sans);color:#806b62;margin:0 0 12px}
@media(max-width:760px){
#stories #carol-story{grid-template-columns:1fr;gap:24px;padding-top:30px}
#carol-story .story-profile-heading{grid-row:1;grid-column:1}
#stories #carol-story .eyebrow{max-width:none}
#carol-story .carol-photo-pair{grid-row:2;grid-column:1;gap:12px}
#carol-story .carol-then{padding-top:28px}
#stories #carol-story blockquote{grid-row:3;grid-column:1;font-size:18px}
#carol-story .story-footer{grid-row:4;grid-column:1}
#carol-story .carol-photo-pair figcaption{font-size:13px}
}

/* A deeper rose/champagne edge with a quiet, readable centre. */
.pearl-motion{background:#f5eae2}
.pearl-motion:before{background-image:radial-gradient(ellipse at -8% 28%,#ae7f8b50,transparent 63%),radial-gradient(ellipse at 108% 65%,#b68c5c44,transparent 64%),url('assets/pearl-background.png')}

/* Wider illuminated folds: visible silk bands rather than hairline outlines. */
.pearl-motion:before{filter:contrast(1.08) saturate(1.06)}
.pearl-motion:after,.pearl-motion .silk-depth{mix-blend-mode:multiply}
.pearl-motion .silk-ribbon{opacity:.85;background:radial-gradient(ellipse at 112% 12%,transparent 44%,#bd8e7952 49%,#fffdf8ed 52%,#fff8ee80 55%,transparent 60%);mask-image:linear-gradient(to bottom,#000 0%,#000 85%,transparent 100%);filter:blur(1px)}
.pearl-motion .silk-ribbon-two{opacity:.7;background:radial-gradient(ellipse at -15% 35%,transparent 43%,#c39c8759 48%,#fffef3e6 51%,#fff4e97a 55%,transparent 60%);mask-image:linear-gradient(to bottom,#000 0%,#000 85%,transparent 100%)}
#contact{padding-block:80px;background-image:linear-gradient(to bottom,#faf6ef 0,#806862 48px,#806862 calc(100% - 48px),#faf6ef 100%),url('assets/pearl-background.png')}
#contact .contact-label,#contact .hours-note,#contact .contact-email>span:first-child{color:#fff2e9}

/* Feather every edge of the rotating ribbons so no rectangular layer edge
   can enter the tall iPhone opening during the animation. */
.pearl-motion .silk-ribbon{
 inset:-20%;
 -webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent),linear-gradient(to right,transparent,#000 14%,#000 86%,transparent);
 -webkit-mask-composite:source-in;
 mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent),linear-gradient(to right,transparent,#000 14%,#000 86%,transparent);
 mask-composite:intersect;
}
