/* Ivypop V60 · focused photographic art direction for Candid Chemistry + Compare.
   ONLY these two sections and their atmospheric transition are affected.
   Espresso, Double Shot, other site sections and their code remain untouched. */

/* Atmosphere is now built around photography, not a giant colored blob. */
.v59-world{
  background:#fffbfa;
}
.v59-world::before{
  background:linear-gradient(180deg,#fffcfa 0%,#fffbfa 39%,#fff8f7 59%,#fffcfb 86%,#fffcfb 100%);
}
.v59-atmosphere-a{
  top:165px;right:-9%;width:min(61vw,870px);height:580px;
  border-radius:57% 43% 42% 58%/55% 51% 49% 45%;
  background:linear-gradient(125deg,rgba(255,189,130,.25),rgba(249,107,125,.33) 61%,rgba(246,64,136,.36));
  transform:rotate(-8deg);filter:none;opacity:1;
}
.v59-atmosphere-b{
  top:920px;left:-23%;width:min(52vw,660px);height:530px;
  background:linear-gradient(120deg,rgba(255,196,154,.23),rgba(247,77,132,.15));
  border-radius:51% 49% 39% 61%/52% 56% 44% 48%;transform:rotate(11deg);
}

/* CANDID — branding / actions share the left column, portrait opens on the right. */
#the-details.v59-chemistry{padding:64px 0 12px}
.v59-chem-shell{width:min(1300px,calc(100% - 86px));position:relative}
.v59-chem-heading{
  position:absolute;z-index:5;top:0;left:0;width:44%;min-height:0;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;
  gap:11px;margin:0;
}
.v59-chem-logo{width:clamp(190px,16.5vw,234px);height:auto;max-height:102px;object-fit:contain;object-position:left center}
.v59-chem-heading>div{max-width:560px}
.v59-chem-heading h2{font-size:clamp(30px,3.05vw,43px);line-height:1.08;letter-spacing:-.05em;margin-bottom:9px;max-width:490px}
.v59-chem-heading p{font-size:14px;line-height:1.48}
.v59-chem-layout{
  display:grid;grid-template-columns:minmax(0,.46fr) minmax(0,.54fr);
  align-items:start;gap:clamp(10px,2vw,28px);min-height:600px;
}
.v59-chem-activity{align-self:start;margin:0;padding-top:240px;z-index:4}
#the-details.v59-chemistry .chem-v55-toolbar{gap:11px;margin:0 0 19px}
#the-details.v59-chemistry .chem-v55-mode button,
#the-details.v59-chemistry .chem-v55-categories button{min-height:42px}
#the-details.v59-chemistry .chem-v55-workspace{width:min(100%,515px);border-radius:26px}
#the-details.v59-chemistry .chem-v55-question{padding:27px clamp(22px,2.5vw,34px) 26px}
#the-details.v59-chemistry #chem-question{font-size:clamp(26px,2.65vw,36px);line-height:1.16;letter-spacing:-.043em}
#the-details.v59-chemistry .chem-v55-next{margin-top:24px}

/* Independent photographic environment: real sourced Los Angeles image on live
   site (Pexels / Roberto Nickson, no identifiable people), with the approved
   locally bundled LA sunset texture as offline fallback behind it. */
.v59-chem-media{height:605px;position:relative;isolation:isolate}

.v59-portrait-halo{
  inset:12% -3% 13% 8%;border-radius:51% 49% 41% 59%/44% 56% 44% 56%;
  background:linear-gradient(131deg,rgba(255,193,128,.39),rgba(255,127,120,.46) 50%,rgba(246,67,138,.55));
  transform:rotate(-9deg);filter:none;opacity:.75;z-index:-1;
}
.v59-maya-portrait{
  left:3%;top:32px;width:78%;height:480px;
  border-radius:38% 38% 27px 27px/28% 30% 27px 27px;
  box-shadow:0 20px 43px rgba(82,32,47,.15);
}
.v59-maya-portrait img{
  object-fit:cover;object-position:center 59%;
  filter:saturate(.99) contrast(1.015);
}
.v59-maya-portrait figcaption{left:24px;bottom:19px;font-size:21px}
#the-details.v59-chemistry .chem-v55-answer{
  right:-7%;top:287px;width:43%;padding:22px 23px 23px;
  border-radius:24px;box-shadow:0 15px 33px rgba(75,32,45,.14),0 1px 3px rgba(45,26,34,.04);
}
#the-details.v59-chemistry .chem-v55-answer-text{
  font-size:clamp(18px,1.58vw,23px);line-height:1.3;letter-spacing:-.03em;
  margin-bottom:15px;
}
#the-details.v59-chemistry .chem-v55-footnote{margin-top:0}
.v59-atmospheric-handoff{height:4px}

/* COMPARE — larger photographic framing, less pink surface, less editorial copy. */
#compare.v59-compare{padding:28px 0 75px}
#compare.v59-compare .v57-shell{width:min(1190px,calc(100% - 76px))}
#compare.v59-compare .v57-intro{margin-bottom:20px}
#compare.v59-compare .v57-intro h2{font-size:clamp(32px,3.1vw,45px)}
#compare.v59-compare .v57-subtitle{margin-top:7px}
#compare.v59-compare .v57-tabs{margin-bottom:20px}
#compare.v59-compare .v57-people{gap:20px}
#compare.v59-compare .v57-picture{height:clamp(320px,31vw,390px)}
#compare.v59-compare [data-v57-person=maya] .v57-picture img{object-position:center 59%;filter:saturate(.96)}
#compare.v59-compare [data-v57-person=malik] .v57-picture img{object-position:center 51%;filter:saturate(.94)}
#compare.v59-compare .v57-story{min-height:112px;padding:15px 21px 21px}
#compare.v59-compare .v57-discovery{margin-top:18px}
#compare.v59-compare .v57-discovery h3{font-size:clamp(23px,2.15vw,29px)}
#compare.v59-compare .v57-discovery>p{font-size:12px;margin-top:7px}
#compare.v59-compare .v57-question{margin-top:12px}
#compare.v59-compare .v57-disclaimer{margin-top:20px}

/* Laptop layout: preserve brand hierarchy, don't let overlap obscure the face. */
@media (min-width:961px) and (max-width:1160px){
 .v59-chem-shell{width:calc(100% - 54px)}
 .v59-chem-heading{width:45%;gap:8px}
 .v59-chem-logo{width:185px}
 .v59-chem-heading h2{font-size:clamp(31px,3.35vw,39px)}
 .v59-chem-layout{grid-template-columns:minmax(0,.45fr) minmax(0,.55fr);gap:8px;min-height:575px}
 .v59-chem-activity{padding-top:233px}
 .v59-chem-media{height:575px}
 .v59-maya-portrait{top:35px;left:2%;width:78%;height:450px}
 #the-details.v59-chemistry .chem-v55-answer{right:-5%;top:282px;width:45%;padding:18px}
 #the-details.v59-chemistry .chem-v55-answer-text{font-size:18px}
 #the-details.v59-chemistry .chem-v55-categories button{padding:8px 10px;min-height:40px}
 #the-details.v59-chemistry #chem-question{font-size:clamp(25px,2.7vw,31px)}

 .v59-atmosphere-a{top:165px;right:-17%}
}
/* Tablet: a clear left-aligned brand block above one central interaction. */
@media (min-width:701px) and (max-width:960px){
 .v59-chem-shell{width:min(750px,calc(100% - 40px))}
 .v59-chem-heading{position:relative;left:auto;top:auto;width:100%;align-items:center;text-align:center;gap:8px;margin-bottom:22px}
 .v59-chem-logo{width:205px;max-height:95px}
 .v59-chem-heading h2{font-size:38px;max-width:none}
 .v59-chem-heading>div{max-width:none}
 .v59-chem-layout{display:flex;flex-direction:column;gap:13px;min-height:0}
 .v59-chem-activity{padding:0;width:100%;align-self:stretch}
 #the-details.v59-chemistry .chem-v55-toolbar{margin:0 auto 16px;align-items:center}
 #the-details.v59-chemistry .chem-v55-workspace{width:min(100%,600px);margin:0 auto}
 .v59-chem-media{width:min(100%,700px);height:590px;margin:auto}
 .v59-maya-portrait{left:9%;top:30px;width:70%;height:485px}
 #the-details.v59-chemistry .chem-v55-answer{right:0;top:320px;width:44%}

 .v59-portrait-halo{inset:9% -2% 10% 10%}
 #compare.v59-compare .v57-shell{width:calc(100% - 42px)}
 #compare.v59-compare .v57-picture{height:300px}
}
/* Phone: no face obstruction, no clipped answer, both Compare portraits visible. */
@media(max-width:700px){
 .v59-world::before{background:linear-gradient(180deg,#fffcfa,#fffaf9 54%,#fffbfa)}
 .v59-atmosphere-a{top:410px;right:-62%;width:132vw;height:460px;opacity:.45}
 .v59-atmosphere-b{top:1450px;left:-68%;width:122vw;height:400px;opacity:.42}
 #the-details.v59-chemistry{padding-top:30px}
 .v59-chem-shell{width:calc(100% - 30px)}
 .v59-chem-heading{position:relative;top:auto;left:auto;width:100%;flex-direction:column;align-items:center;gap:7px;margin-bottom:23px;text-align:center}
 .v59-chem-logo{width:clamp(185px,52vw,225px);max-height:none}
 .v59-chem-heading h2{font-size:clamp(27px,7vw,35px);margin-bottom:6px}
 .v59-chem-heading p{font-size:12px}
 .v59-chem-layout{display:flex;flex-direction:column;gap:13px;min-height:0}
 .v59-chem-activity{padding:0;width:100%;align-self:stretch}
 #the-details.v59-chemistry .chem-v55-toolbar{gap:9px;margin-bottom:14px;align-items:center}
 #the-details.v59-chemistry .chem-v55-workspace{width:100%}
 #the-details.v59-chemistry .chem-v55-question{padding:22px 23px 23px}
 #the-details.v59-chemistry #chem-question{font-size:clamp(25px,6.6vw,30px)}
 .v59-chem-media{width:100%;height:auto;display:flex;flex-direction:column;align-items:center;gap:0;padding:15px 0 0}

 .v59-portrait-halo{top:16px;left:0;right:0;bottom:auto;height:285px;opacity:.72}
 .v59-maya-portrait{left:auto;top:auto;width:100%;height:clamp(290px,83vw,415px);position:relative;border-radius:38% 38% 22px 22px/29% 29% 22px 22px}
 .v59-maya-portrait img{object-position:center 58%}
 .v59-maya-portrait figcaption{bottom:20px;left:20px}
 #the-details.v59-chemistry .chem-v55-answer{position:relative;right:auto;top:auto;width:calc(100% - 22px);margin:-19px auto 0;padding:20px;border-radius:21px}
 #the-details.v59-chemistry .chem-v55-answer-text{font-size:clamp(19px,5.3vw,23px)}
 #compare.v59-compare{padding:37px 0 60px}
 #compare.v59-compare .v57-shell{width:calc(100% - 28px)}
 #compare.v59-compare .v57-picture{height:clamp(163px,47vw,255px)}
 #compare.v59-compare [data-v57-person=maya] .v57-picture img{object-position:center 58%}
 #compare.v59-compare [data-v57-person=malik] .v57-picture img{object-position:center 52%}
 #compare.v59-compare .v57-intro{margin-bottom:17px}
 #compare.v59-compare .v57-tabs{margin-bottom:14px}
 #compare.v59-compare .v57-discovery{margin-top:18px}
 #compare.v59-compare .v57-discovery h3{font-size:clamp(22px,5.6vw,28px)}
}
@media(max-width:360px){
 #the-details.v59-chemistry .chem-v55-question{padding:21px}
 #the-details.v59-chemistry #chem-question{font-size:24px}
 #the-details.v59-chemistry .chem-v55-answer{padding:18px}
 #compare.v59-compare .v57-picture{height:150px}
}
@media(prefers-reduced-motion:reduce){
 .v59-world *, .v59-world *::before,.v59-world *::after{animation:none!important;transition:none!important}
}

/* Final art-direction correction: the LA photography must read as a PHOTO,
   independently of the portrait and the organic forms. On public Pages this
   resolves to the licensed no-person LA landscape; locally the bundled
   cinematic palm/skyline crop supplies an offline fallback. */
#the-details.v59-chemistry::before{
  content:"";
  position:absolute;
  z-index:0;
  top:0;
  right:-1px;
  width:min(68vw,970px);
  height:585px;
  pointer-events:none;
  background-image:
    linear-gradient(90deg,rgba(255,251,250,.25),rgba(255,246,246,.015) 56%,rgba(255,251,250,.12)),
    url('https://images.pexels.com/photos/2816168/pexels-photo-2816168.jpeg?auto=compress&cs=tinysrgb&w=1800'),
    url('/assets/v59-la-sunset-atmosphere.webp');
  background-repeat:no-repeat;
  background-size:cover,cover,100% 90%;
  background-position:center,center center,center 5%;
  -webkit-mask-image:radial-gradient(ellipse 85% 71% at 71% 37%,#000 31%,rgba(0,0,0,.81) 60%,transparent 100%);
  mask-image:radial-gradient(ellipse 85% 71% at 71% 37%,#000 31%,rgba(0,0,0,.81) 60%,transparent 100%);
  opacity:.76;
  filter:saturate(.82) brightness(1.08);
}
.v59-chem-shell{z-index:1}

.v59-portrait-halo{inset:14% 6% 12% 10%;opacity:.42}
@media(max-width:960px){
  #the-details.v59-chemistry::before{
    width:100%;height:600px;top:230px;opacity:.59;
    -webkit-mask-image:radial-gradient(ellipse 78% 65% at 72% 43%,#000 27%,rgba(0,0,0,.7) 55%,transparent 100%);
    mask-image:radial-gradient(ellipse 78% 65% at 72% 43%,#000 27%,rgba(0,0,0,.7) 55%,transparent 100%);
  }
}
@media(max-width:700px){
  #the-details.v59-chemistry::before{
    top:300px;height:640px;width:100%;opacity:.5;
    -webkit-mask-image:linear-gradient(180deg,transparent 2%,rgba(0,0,0,.36) 23%,#000 57%,transparent 96%);
    mask-image:linear-gradient(180deg,transparent 2%,rgba(0,0,0,.36) 23%,#000 57%,transparent 96%);
  }
  .v59-portrait-halo{top:16px;right:0;left:0;bottom:auto;height:285px;opacity:.44}
}
/* Keep photographic silhouettes outside the logo/headline's reading zone. */
@media(min-width:961px){
 #the-details.v59-chemistry::before{
  -webkit-mask-image:radial-gradient(ellipse 72% 69% at 84% 39%,#000 34%,rgba(0,0,0,.79) 59%,transparent 100%);
  mask-image:radial-gradient(ellipse 72% 69% at 84% 39%,#000 34%,rgba(0,0,0,.79) 59%,transparent 100%);
 }
}
