/* ==========================================================
   MERARY — FLOATING FEATURE CARDS V2
   Isolated styles for ONLY the 3 floating cards and glow stars.
   ========================================================== */

:root{
  --mf2-accent:#ff5f86;
  --mf2-text:#302a28;
  --mf2-muted:#817775;
  --mf2-border:rgba(237,186,198,.82);
}

/* container */
.mf2-wrap{
  position:relative;
  width:min(1480px,calc(100% - 60px));
  min-height:275px;
  margin:0 auto;

  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:center;
  gap:32px;

  padding:34px 18px 42px;

  overflow:visible;
  isolation:isolate;
}

/* cards */
.mf2-card{
  position:relative;
  z-index:3;

  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:20px;

  min-height:146px;
  padding:25px 30px;

  border:1px solid var(--mf2-border);
  border-radius:30px;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.955),
      rgba(255,250,250,.87)
    );

  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);

  box-shadow:
    0 18px 46px rgba(155,83,99,.105),
    0 1px 0 rgba(255,255,255,.88) inset;

  opacity:0;
  filter:blur(5px);

  will-change:transform,opacity,filter;

  transition:
    border-color .28s ease,
    box-shadow .28s ease,
    background .28s ease,
    filter .28s ease;
}

/* editorial asymmetry */
.mf2-card--fresh{
  animation:mf2FloatFresh 8.8s ease-in-out infinite;
}

.mf2-card--photo{
  animation:mf2FloatPhoto 10.2s ease-in-out infinite -2.4s;
}

.mf2-card--handmade{
  animation:mf2FloatHand 9.6s ease-in-out infinite -4.1s;
}

/* base floating movement */
@keyframes mf2FloatFresh{
  0%,100%{
    transform:translate3d(0,15px,0) rotate(-1deg);
  }
  50%{
    transform:translate3d(5px,7px,0) rotate(-.45deg);
  }
}

@keyframes mf2FloatPhoto{
  0%,100%{
    transform:translate3d(0,-10px,0) rotate(.4deg) scale(1.04);
  }
  50%{
    transform:translate3d(-4px,-18px,0) rotate(.1deg) scale(1.04);
  }
}

@keyframes mf2FloatHand{
  0%,100%{
    transform:translate3d(0,16px,0) rotate(1deg);
  }
  50%{
    transform:translate3d(-5px,8px,0) rotate(.45deg);
  }
}

/* hover */
.mf2-card:hover{
  animation-play-state:paused;

  border-color:rgba(255,95,134,.62);

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.99),
      rgba(255,249,250,.94)
    );

  box-shadow:
    0 28px 62px rgba(152,77,94,.17),
    0 0 0 1px rgba(255,95,134,.035),
    0 1px 0 rgba(255,255,255,.96) inset;
}

.mf2-card--fresh:hover{
  transform:translate3d(0,3px,0) rotate(-.6deg);
}

.mf2-card--photo:hover{
  transform:translate3d(0,-20px,0) rotate(.1deg) scale(1.05);
}

.mf2-card--handmade:hover{
  transform:translate3d(0,5px,0) rotate(.6deg);
}

/* icon */
.mf2-card__icon{
  display:grid;
  place-items:center;

  width:64px;
  height:64px;

  border-radius:50%;

  color:var(--mf2-accent);

  background:
    radial-gradient(
      circle,
      rgba(255,95,134,.145),
      rgba(255,95,134,.055)
    );

  font-size:28px;

  transition:
    transform .3s cubic-bezier(.2,.7,.2,1),
    box-shadow .3s ease,
    background .3s ease;
}

.mf2-card:hover .mf2-card__icon{
  transform:scale(1.07);

  background:
    radial-gradient(
      circle,
      rgba(255,95,134,.20),
      rgba(255,95,134,.075)
    );

  box-shadow:
    0 0 0 9px rgba(255,95,134,.035),
    0 0 34px rgba(255,95,134,.14);
}

/* copy */
.mf2-card__copy h3{
  margin:0 0 7px;

  color:var(--mf2-text);

  font-family:Georgia,"Times New Roman",serif;
  font-size:27px;
  line-height:1.01;
  font-weight:400;
  letter-spacing:-.025em;
}

.mf2-card__copy p{
  margin:0;

  color:var(--mf2-muted);

  font-family:Arial,Helvetica,sans-serif;
  font-size:14px;
  line-height:1.48;
}

/* reveal */
.mf2-wrap.is-ready .mf2-card{
  transition:
    opacity .82s cubic-bezier(.2,.72,.2,1),
    filter .82s cubic-bezier(.2,.72,.2,1),
    border-color .28s ease,
    box-shadow .28s ease,
    background .28s ease;
}

.mf2-wrap.is-visible .mf2-card{
  opacity:1;
  filter:blur(0);
}

.mf2-wrap.is-ready .mf2-card--fresh{transition-delay:.03s}
.mf2-wrap.is-ready .mf2-card--photo{transition-delay:.16s}
.mf2-wrap.is-ready .mf2-card--handmade{transition-delay:.29s}

/* starburst "snowflakes" */
.mf2-star{
  position:absolute;
  z-index:2;

  width:36px;
  height:36px;

  pointer-events:none;

  opacity:.42;

  filter:
    drop-shadow(0 0 8px rgba(255,255,255,.90))
    drop-shadow(0 0 16px rgba(255,181,201,.42));

  background:
    linear-gradient(45deg,transparent 47%,rgba(255,255,255,.84) 49%,rgba(255,255,255,.84) 51%,transparent 53%),
    linear-gradient(-45deg,transparent 47%,rgba(255,255,255,.84) 49%,rgba(255,255,255,.84) 51%,transparent 53%);

  animation:
    mf2StarPulse 4.8s ease-in-out infinite,
    mf2StarSpin 18s linear infinite;
}

.mf2-star::before,
.mf2-star::after{
  content:"";

  position:absolute;
  left:50%;
  top:50%;

  width:2px;
  height:100%;

  transform:translate(-50%,-50%);

  border-radius:999px;

  background:
    linear-gradient(
      180deg,
      transparent,
      rgba(255,255,255,.96) 43%,
      #fff 50%,
      rgba(255,255,255,.96) 57%,
      transparent
    );
}

.mf2-star::after{
  transform:translate(-50%,-50%) rotate(90deg);
}

@keyframes mf2StarPulse{
  0%,100%{
    opacity:.18;
    scale:.82;
  }
  45%{
    opacity:.82;
    scale:1.10;
  }
  72%{
    opacity:.38;
    scale:.94;
  }
}

@keyframes mf2StarSpin{
  from{rotate:0deg}
  to{rotate:360deg}
}

/* exact positions around cards */
.mf2-star--1{left:2%;top:15%;animation-delay:-1s,-2s}
.mf2-star--2{left:31%;top:3%;width:27px;height:27px;animation-delay:-2.6s,-7s}
.mf2-star--3{left:64%;top:8%;width:30px;height:30px;animation-delay:-.8s,-10s}
.mf2-star--4{right:2%;top:41%;width:40px;height:40px;animation-delay:-3.1s,-4s}
.mf2-star--5{left:50%;bottom:1%;width:25px;height:25px;animation-delay:-4.2s,-9s}

/* glow dots */
.mf2-dot{
  position:absolute;
  z-index:2;

  width:9px;
  height:9px;

  border-radius:50%;

  background:#fff;

  pointer-events:none;

  box-shadow:
    0 0 8px rgba(255,255,255,.98),
    0 0 21px rgba(255,161,185,.52);

  animation:mf2DotPulse 4.5s ease-in-out infinite;
}

@keyframes mf2DotPulse{
  0%,100%{
    opacity:.16;
    scale:.8;
  }
  50%{
    opacity:.95;
    scale:1.24;
  }
}

.mf2-dot--1{left:21%;bottom:11%;animation-delay:-1.2s}
.mf2-dot--2{left:49%;bottom:17%;animation-delay:-3s}
.mf2-dot--3{right:24%;bottom:9%;animation-delay:-.6s}
.mf2-dot--4{right:9%;top:14%;animation-delay:-2.1s}

/* tablet */
@media(max-width:1050px){
  .mf2-wrap{
    width:calc(100% - 40px);
    gap:18px;
  }

  .mf2-card{
    gap:15px;
    padding:20px;
  }

  .mf2-card__icon{
    width:54px;
    height:54px;
  }

  .mf2-card__copy h3{
    font-size:23px;
  }
}

/* mobile */
@media(max-width:760px){
  .mf2-wrap{
    width:calc(100% - 24px);
    min-height:510px;

    grid-template-columns:1fr;
    gap:13px;

    padding:20px 6px 26px;
  }

  .mf2-card{
    min-height:118px;
  }

  .mf2-card--fresh{
    animation:mf2Mobile1 9s ease-in-out infinite;
  }

  .mf2-card--photo{
    animation:mf2Mobile2 9.6s ease-in-out infinite -2s;
  }

  .mf2-card--handmade{
    animation:mf2Mobile3 10.1s ease-in-out infinite -4s;
  }

  @keyframes mf2Mobile1{
    0%,100%{transform:translateY(0)}
    50%{transform:translateY(-5px)}
  }

  @keyframes mf2Mobile2{
    0%,100%{transform:translateY(-2px)}
    50%{transform:translateY(-8px)}
  }

  @keyframes mf2Mobile3{
    0%,100%{transform:translateY(1px)}
    50%{transform:translateY(-4px)}
  }

  .mf2-card__copy h3{
    font-size:22px;
  }

  .mf2-star--4{
    right:0;
    top:50%;
  }
}

/* accessibility */
@media(prefers-reduced-motion:reduce){
  .mf2-card,
  .mf2-star,
  .mf2-dot{
    animation:none!important;
  }

  .mf2-card{
    opacity:1!important;
    filter:none!important;
    transform:none!important;
  }
}

/* ==========================================================
   Site integration — place V2 cards inside About cinematic
   ========================================================== */
.merary-cinematic .mf2-wrap{
  position:absolute;
  z-index:9;
  left:30px;
  right:30px;
  bottom:58px;
  width:auto;
  margin:0;
  padding:28px 10px 34px;
  min-height:250px;
}

.merary-cinematic .mf2-card__copy h3{
  font-family:var(--font-serif,'Playfair Display',Georgia,'Times New Roman',serif);
}

.merary-cinematic.is-animations-paused .mf2-card,
.merary-cinematic.is-animations-paused .mf2-star,
.merary-cinematic.is-animations-paused .mf2-dot{
  animation-play-state:paused!important;
}

@media(max-width:1050px){
  .merary-cinematic .mf2-wrap{
    left:20px;
    right:20px;
    bottom:48px;
  }
}

@media(max-width:760px){
  .merary-cinematic .mf2-wrap{
    left:12px;
    right:12px;
    bottom:48px;
    min-height:430px;
    padding:18px 4px 24px;
  }

  .merary-cinematic__shell{
    min-height:1240px;
  }
}
