/* CloudFold tile on the Products page and home page: CloudFold's own look (green, Sora).
   Two outlined squares slide together behind the phone, the same idea as the mark. */
@font-face { font-family: "Sora"; src: url("/assets/products/cloudfold/fonts/Sora.ttf") format("truetype"); font-weight: 100 800; font-display: swap; }
.pf--cloudfold {
  --cf-green: #0E6B4A;
  --cf-soft: #CDE8DA;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  padding: clamp(1.75rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem) 0;
  background: var(--cf-green);
  color: #FFFFFF;
  border-radius: 1.5rem;
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
}
.pf--cloudfold::before,
.pf--cloudfold::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: clamp(14rem, 34vw, 24rem);
  aspect-ratio: 1;
  border: 0.5rem solid rgba(255, 255, 255, 0.14);
  border-radius: 28%;
  pointer-events: none;
}
.pf--cloudfold::before { right: clamp(1rem, 12vw, 11rem); top: 12%; }
.pf--cloudfold::after { right: clamp(-3rem, 3vw, 3rem); top: 38%; }
/* Motion contract: motion.js drives --pf-enter (1 -> 0 as the tile arrives) and
   --pf-scroll (-1 -> 1 as the tile crosses the screen). Both default to 0 = resting state. */
.pf--cloudfold::before {
  translate: calc(var(--pf-enter, 0) * -5rem + var(--pf-px, 0) * 1.1rem) calc(var(--pf-enter, 0) * -5rem + var(--pf-scroll, 0) * 1.75rem + var(--pf-py, 0) * 1.1rem);
  rotate: calc(var(--pf-scroll, 0) * -4deg);
  opacity: calc(1 - var(--pf-enter, 0));
}
.pf--cloudfold::after {
  translate: calc(var(--pf-enter, 0) * 5rem + var(--pf-px, 0) * -1.6rem) calc(var(--pf-enter, 0) * 5rem + var(--pf-scroll, 0) * -1.75rem + var(--pf-py, 0) * -1.6rem);
  rotate: calc(var(--pf-scroll, 0) * 4deg);
  opacity: calc(1 - var(--pf-enter, 0));
}
.pf--cloudfold .pf__shot { translate: calc(var(--pf-px, 0) * 0.7rem) calc(var(--pf-scroll, 0) * -2.25rem + var(--pf-py, 0) * 0.5rem); }
.pf--cloudfold { --dc-code: #8FF0C0; }

.pf--cloudfold .pf__copy { align-self: center; padding-bottom: var(--space-6); }
.pf--cloudfold .pf__mark { width: 3.5rem; height: 3.5rem; border-radius: 0.9rem; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.pf--cloudfold .pf__name { font: 600 clamp(2.25rem, 5vw, 3.5rem)/1 "Sora", ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.04em; }
.pf--cloudfold .pf__name a { color: #FFFFFF; text-decoration: none; }
.pf--cloudfold .pf__tagline { font: 600 clamp(1.25rem, 2.4vw, 1.625rem)/1.25 "Sora", ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.02em; max-width: 22ch; }
.pf--cloudfold .pf__summary { color: var(--cf-soft); font: 400 1.0625rem/1.6 var(--ds-font-body); max-width: 34rem; }
.pf--cloudfold .pf__meta { color: var(--cf-soft); font: 500 0.875rem/1.5 var(--ds-font-body); }
.pf--cloudfold .pf__btn {
  display: inline-block;
  padding: 0.9rem 1.35rem;
  background: #FFFFFF;
  color: #0A4F37;
  font: 600 1rem/1 "Sora", ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
  border-radius: 0.8rem;
}
.pf--cloudfold .pf__btn:hover { background: #DCEFE5; }
.pf--cloudfold .pf__link { color: #FFFFFF; font: 500 0.9375rem/1.4 var(--ds-font-body); text-underline-offset: 0.25em; }
.pf--cloudfold a:focus-visible { outline-color: #FFFFFF; }

/* The phone is cropped by the bottom edge of the tile. */
.pf--cloudfold .pf__shot {
  justify-self: center;
  width: min(100%, 17rem);
  margin-bottom: -5rem;
  padding: 0.5rem;
  background: #0A0E0B;
  border-radius: 2.4rem;
  box-shadow: 0 1.5rem 3rem -1.25rem rgba(5, 40, 28, 0.7);
}
.pf--cloudfold .pf__shot img { width: 100%; height: auto; aspect-ratio: 1 / 2; border-radius: 1.9rem; }

@media (min-width: 56em) {
  .pf--cloudfold { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 6vw, 5rem); }
  .pf--cloudfold .pf__shot { margin-top: var(--space-6); margin-bottom: -7rem; }
}

.pf--cloudfold .pf__devices .pi { width: 1.05em; height: 1.05em; flex: none; }
.pf--cloudfold .pf__devices li {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  color: #FFFFFF;
  font: 500 0.875rem/1.2 var(--ds-font-body);
}


/* The mark, animated. Its two squares are the device and the server; the dot is what is the same on both.
   motion.js adds .is-in when the tile arrives and .is-selected while it is hovered, focused or tapped. */
.pf--cloudfold .pf__mark { overflow: visible; }
.pf--cloudfold .pf__mark g rect,
.pf--cloudfold .pf__mark g circle { transform-box: fill-box; transform-origin: 50% 50%; }
.pf--cloudfold.is-in .pf__mark g rect:nth-of-type(1) { animation: cf-mark-a 1.1s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both, cf-breathe-a 4.5s 2.2s ease-in-out infinite; }
.pf--cloudfold.is-in .pf__mark g rect:nth-of-type(2) { animation: cf-mark-b 1.1s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both, cf-breathe-b 4.5s 2.2s ease-in-out infinite; }
.pf--cloudfold.is-in .pf__mark g circle { animation: cf-mark-core 0.7s 1.25s cubic-bezier(0.3, 1.8, 0.4, 1) both, cf-pulse 4.5s 2.2s ease-in-out infinite; }
.pf--cloudfold.is-in.is-selected .pf__mark g rect:nth-of-type(1) { animation: cf-refold-a 1s cubic-bezier(0.625, 0.05, 0, 1) both; }
.pf--cloudfold.is-in.is-selected .pf__mark g rect:nth-of-type(2) { animation: cf-refold-b 1s cubic-bezier(0.625, 0.05, 0, 1) both; }
.pf--cloudfold.is-in.is-selected .pf__mark g circle { animation: cf-recore 1s cubic-bezier(0.625, 0.05, 0, 1) both; }
@keyframes cf-mark-a { from { transform: translate(-42%, -42%); opacity: 0; } }
@keyframes cf-mark-b { from { transform: translate(42%, 42%); opacity: 0; } }
@keyframes cf-mark-core { from { transform: scale(0); } }
@keyframes cf-breathe-a { 50% { transform: translate(-7%, -7%); } }
@keyframes cf-breathe-b { 50% { transform: translate(7%, 7%); } }
@keyframes cf-pulse { 50% { transform: scale(0.72); } }
@keyframes cf-refold-a { 0% { transform: none; } 45% { transform: translate(-30%, -30%) rotate(-90deg); } 100% { transform: rotate(-90deg); } }
@keyframes cf-refold-b { 0% { transform: none; } 45% { transform: translate(30%, 30%) rotate(90deg); } 100% { transform: rotate(90deg); } }
@keyframes cf-recore { 0% { transform: scale(1); } 45% { transform: scale(0); } 100% { transform: scale(1); } }
