/* Magnet Studio M12 — final visual polish, rhythm and motion. */

:root {
  --m16-polish-ease: cubic-bezier(.22,.7,.2,1);
  --m16-polish-shadow: 0 34px 90px rgba(25,39,78,.12);
}

body:has(.m16-home) {
  background:
    radial-gradient(circle at 4% 1%,rgba(75,103,255,.09),transparent 25%),
    radial-gradient(circle at 96% 8%,rgba(238,59,171,.06),transparent 24%),
    linear-gradient(180deg,#f8f9fc 0%,#f3f5f9 48%,#f6f7fa 100%);
  background-attachment: fixed;
}

body:has(.m16-home) .ms-header {
  isolation: isolate;
  overflow: hidden;
  transition:
    min-height .35s var(--m16-polish-ease),
    width .35s var(--m16-polish-ease),
    margin .35s var(--m16-polish-ease),
    background .35s ease,
    box-shadow .35s ease,
    border-color .35s ease;
}

body:has(.m16-home) .ms-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(105deg,rgba(49,88,255,.24),rgba(255,255,255,.92) 34%,rgba(234,59,168,.18) 82%,rgba(255,255,255,.78));
  -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

body:has(.m16-home) .ms-header::after {
  content: '';
  width: 250px;
  height: 120px;
  position: absolute;
  right: 14%;
  top: -88px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(104,83,255,.16),transparent 69%);
  filter: blur(7px);
  pointer-events: none;
}

body:has(.m16-home) .ms-header.is-m16-scrolled {
  width: min(1340px,calc(100vw - 42px));
  min-height: 64px;
  margin-top: 7px;
  border-color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.78);
  box-shadow: 0 18px 48px rgba(22,35,73,.14),inset 0 1px 0 rgba(255,255,255,.9);
}

body:has(.m16-home) .ms-header > a {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 14px;
}

body:has(.m16-home) .ms-header > a:focus-visible {
  box-shadow: 0 0 0 4px rgba(49,88,255,.12) !important;
}

body:has(.m16-home) .ms-nav a {
  position: relative;
  transition: color .2s ease,transform .2s ease;
}

body:has(.m16-home) .ms-nav a::before {
  content: '';
  height: 2px;
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg,#3158ff,#ea3ba8);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .22s ease;
}

body:has(.m16-home) .ms-nav a:hover {
  transform: translateY(-1px);
}

body:has(.m16-home) .ms-nav a:hover::before,
body:has(.m16-home) .ms-nav a.is-active::before {
  transform: scaleX(1);
}

body:has(.m16-home) .ms-button--small,
.m16-home .m16-primary {
  background-size: 180% 180%;
  transition: transform .24s var(--m16-polish-ease),box-shadow .24s ease,background-position .45s ease;
}

body:has(.m16-home) .ms-button--small:hover,
.m16-home .m16-primary:hover {
  transform: translateY(-2px) scale(1.012);
  background-position: 100% 50%;
  box-shadow: 0 18px 38px rgba(76,72,228,.30),0 8px 20px rgba(232,54,168,.13),inset 0 1px 0 rgba(255,255,255,.42);
}

/* Progressive entrance motion. */
.m16-home [data-m16-reveal] {
  opacity: 0;
  transform: translate3d(0,30px,0) scale(.992);
  transition: opacity .85s var(--m16-polish-ease),transform .85s var(--m16-polish-ease);
}

.m16-home [data-m16-reveal].is-m16-visible {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
}

.m16-home .m16-hero[data-m16-reveal] {
  transform: translate3d(0,16px,0) scale(.996);
}

/* Hero depth. */
.m16-hero {
  position: relative;
  isolation: isolate;
  box-shadow: 0 36px 105px rgba(26,40,80,.13),0 1px 0 rgba(255,255,255,.88) inset;
}

.m16-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.56);
  pointer-events: none;
}

.m16-hero__copy {
  background:
    radial-gradient(circle at 4% 94%,rgba(49,88,255,.085),transparent 27%),
    linear-gradient(155deg,#fff 0%,#fff 65%,#f8f9ff 100%);
}

.m16-hero h1 em {
  background: linear-gradient(105deg,#3158ff 0%,#4b67ff 44%,#8d50ef 72%,#ea3ba8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.m16-hero__stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at var(--m16-pointer-x,50%) var(--m16-pointer-y,50%),rgba(255,255,255,.18),transparent 31%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.m16-hero__lifestyle {
  transform: scale(1.04) translate3d(calc(var(--m16-shift-x,0px) * -.45),calc(var(--m16-shift-y,0px) * -.45),0);
  transition: transform .4s var(--m16-polish-ease);
}

.m16-hero__studio-card {
  transform: translate3d(var(--m16-shift-x,0px),var(--m16-shift-y,0px),0);
  transition: transform .4s var(--m16-polish-ease),box-shadow .35s ease;
}

.m16-hero__stage:hover .m16-hero__studio-card {
  box-shadow: 0 31px 72px rgba(13,25,58,.29),inset 0 1px 0 rgba(255,255,255,.98);
}

.m16-hero__studio-card > div {
  position: relative;
}

.m16-hero__studio-card > div::before {
  content: '';
  width: 66%;
  aspect-ratio: 1;
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(73,98,255,.16),transparent 67%);
  filter: blur(8px);
}

.m16-hero__studio-card > div img {
  position: relative;
  z-index: 1;
}

.m16-hero__badge {
  box-shadow: 0 14px 34px rgba(22,34,68,.15),inset 0 1px 0 rgba(255,255,255,.8);
}

/* Trust rail and intro rhythm. */
.m16-trust {
  position: relative;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
}

.m16-trust article {
  transition: background .25s ease,transform .25s var(--m16-polish-ease);
}

.m16-trust article:hover {
  background: rgba(243,246,255,.82);
  transform: translateY(-2px);
}

.m16-trust article > span {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88),0 8px 18px rgba(48,72,154,.08);
  transition: transform .25s var(--m16-polish-ease),background .25s ease;
}

.m16-trust article:hover > span {
  transform: rotate(-4deg) scale(1.06);
  background: linear-gradient(145deg,#eef2ff,#e7edff);
}

.m16-manifesto {
  padding-top: 88px;
  padding-bottom: 74px;
  position: relative;
  align-items: center;
}

.m16-manifesto::before {
  content: '';
  height: 1px;
  position: absolute;
  left: 34px;
  right: 34px;
  top: 47px;
  background: linear-gradient(90deg,transparent,rgba(49,88,255,.18) 22%,rgba(234,59,168,.12) 76%,transparent);
}

.m16-manifesto > div:last-child {
  padding: 25px 0 24px 34px;
  border-left: 1px solid rgba(49,88,255,.13);
}

.m16-manifesto h2 {
  max-width: 720px;
}

/* Smart Cut — wider, clearer, connected. */
.m16-smartcut {
  display: block !important;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(42px,4.8vw,64px);
  background:
    radial-gradient(circle at 92% 3%,rgba(49,88,255,.07),transparent 24%),
    linear-gradient(160deg,#fff 0%,#fbfcff 100%);
  box-shadow: var(--m16-polish-shadow);
}

.m16-smartcut::before {
  content: '';
  width: 380px;
  aspect-ratio: 1;
  position: absolute;
  right: -210px;
  top: -230px;
  z-index: -1;
  border: 1px solid rgba(49,88,255,.07);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(49,88,255,.018),0 0 0 110px rgba(49,88,255,.012);
}

.m16-smartcut .m16-section-head {
  width: 100%;
  margin-bottom: 40px;
  grid-template-columns: minmax(0,1.15fr) minmax(360px,.85fr);
  align-items: center;
}

.m16-smartcut__steps {
  width: 100%;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 20px;
}

.m16-smartcut__steps article {
  min-height: 430px;
  padding: 12px 12px 18px;
  overflow: visible;
  border-color: rgba(25,40,80,.09);
  background: rgba(250,251,254,.88);
  box-shadow: 0 18px 42px rgba(29,43,80,.065);
  transition: transform .3s var(--m16-polish-ease),box-shadow .3s ease,border-color .3s ease;
}

.m16-smartcut__steps article:hover {
  z-index: 2;
  transform: translateY(-7px);
  border-color: rgba(49,88,255,.19);
  box-shadow: 0 30px 62px rgba(28,43,82,.13);
}

.m16-smartcut__steps article:not(:last-child)::after {
  content: '→';
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  position: absolute;
  right: -26px;
  top: 42%;
  z-index: 5;
  border: 1px solid rgba(49,88,255,.12);
  border-radius: 50%;
  color: var(--m16-blue);
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 20px rgba(31,45,83,.09);
  font-size: 13px;
  font-weight: 900;
}

.m16-smartcut__image {
  min-height: 280px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.m16-smartcut__image img {
  height: 280px;
  transition: transform .42s var(--m16-polish-ease),filter .42s ease;
}

.m16-smartcut__steps article:hover .m16-smartcut__image img {
  transform: scale(1.035);
}

.m16-smartcut__steps article.is-cutout .m16-smartcut__image img,
.m16-smartcut__steps article.is-finished .m16-smartcut__image img {
  height: 255px;
}

.m16-smartcut__steps article > div:last-child {
  padding: 20px 10px 7px;
}

.m16-smartcut__steps b {
  font-size: 18px;
}

.m16-smartcut__steps p {
  max-width: 300px;
  font-size: 11.5px;
}

.m16-smartcut__promise {
  margin-top: 22px;
  border: 1px solid rgba(20,165,117,.08);
  background: linear-gradient(90deg,#edf9f4,#f4fbf8);
}

/* Product editorial grid. */
.m16-products {
  padding-top: 96px;
}

.m16-products__grid {
  gap: 20px;
}

.m16-products__grid > article {
  position: relative;
  isolation: isolate;
  border-color: rgba(255,255,255,.9);
  box-shadow: 0 22px 58px rgba(29,43,80,.08);
}

.m16-products__grid > article::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg,rgba(49,88,255,.04),transparent 35%,rgba(234,59,168,.035));
  opacity: 0;
  transition: opacity .3s ease;
}

.m16-products__grid > article:hover::before {
  opacity: 1;
}

.m16-products__grid > article:hover {
  transform: translateY(-7px);
  box-shadow: 0 34px 74px rgba(27,42,81,.14);
}

.m16-product__visual {
  position: relative;
}

.m16-product__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 12%,rgba(255,255,255,.48),transparent 35%);
  pointer-events: none;
}

.m16-products__grid .is-featured .m16-product__visual {
  min-height: 390px;
}

.m16-product__visual img {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 20px 24px rgba(31,45,83,.16));
}

.m16-product__visual > span {
  z-index: 2;
  box-shadow: 0 9px 24px rgba(31,45,83,.1);
}

/* Dark product panels. */
.m16-studio-story,
.m16-production {
  position: relative;
  isolation: isolate;
}

.m16-studio-story::before,
.m16-production::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at var(--m16-pointer-x,50%) var(--m16-pointer-y,50%),rgba(91,116,255,.22),transparent 35%);
  transition: background-position .3s ease;
  pointer-events: none;
}

.m16-studio-story::after,
.m16-production::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -2;
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg,transparent,rgba(0,0,0,.7),transparent);
  pointer-events: none;
}

.m16-studio-story {
  margin-top: 96px;
  box-shadow: 0 38px 100px rgba(13,25,60,.25);
}

.m16-editor-window {
  transform: rotate(.7deg) translate3d(var(--m16-shift-x,0px),var(--m16-shift-y,0px),0);
  transition: transform .5s var(--m16-polish-ease),box-shadow .5s ease;
}

.m16-studio-story:hover .m16-editor-window {
  transform: rotate(0deg) translate3d(var(--m16-shift-x,0px),var(--m16-shift-y,0px),0) scale(1.012);
  box-shadow: 0 38px 80px rgba(3,10,29,.4);
}

.m16-editor-canvas img {
  animation: m16-editor-float 5.8s ease-in-out infinite;
}

/* Magnetic sheet story. */
.m16-sheet-story {
  padding-top: 96px;
  padding-bottom: 96px;
}

.m16-sheet-story__visual {
  isolation: isolate;
  box-shadow: 0 28px 72px rgba(29,43,80,.1),inset 0 1px 0 rgba(255,255,255,.8);
}

.m16-sheet-story__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at var(--m16-pointer-x,50%) var(--m16-pointer-y,50%),rgba(255,255,255,.35),transparent 32%);
  pointer-events: none;
}

.m16-sheet-story__visual img {
  transform: rotate(-2deg) translate3d(var(--m16-shift-x,0px),var(--m16-shift-y,0px),0);
  transition: transform .45s var(--m16-polish-ease),filter .45s ease;
}

.m16-sheet-story__visual:hover img {
  transform: rotate(-1deg) translate3d(var(--m16-shift-x,0px),var(--m16-shift-y,0px),0) scale(1.015);
  filter: drop-shadow(19px 24px 0 #7183a5) drop-shadow(0 34px 34px rgba(32,46,82,.22));
}

.m16-sheet-story__visual > span {
  z-index: 3;
}

.m16-sheet-facts span {
  transition: background .22s ease;
}

.m16-sheet-facts span:hover {
  background: #fff;
}

/* Production and final CTA. */
.m16-production {
  box-shadow: 0 38px 100px rgba(13,25,60,.24);
}

.m16-production__art img {
  transform: translate3d(var(--m16-shift-x,0px),var(--m16-shift-y,0px),0);
  transition: transform .5s var(--m16-polish-ease),filter .5s ease;
  animation: m16-production-float 7s ease-in-out infinite;
}

.m16-production:hover .m16-production__art img {
  filter: drop-shadow(0 36px 34px rgba(2,8,24,.4));
}

.m16-final {
  margin-top: 20px;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 88% 20%,rgba(234,59,168,.09),transparent 26%),
    radial-gradient(circle at 72% 90%,rgba(49,88,255,.09),transparent 27%),
    #fff;
  box-shadow: 0 28px 72px rgba(29,43,80,.1);
}

.m16-final::before {
  content: '';
  width: 230px;
  aspect-ratio: 1;
  position: absolute;
  right: -90px;
  top: -110px;
  z-index: -1;
  border: 1px solid rgba(49,88,255,.08);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(49,88,255,.018),0 0 0 70px rgba(234,59,168,.012);
}

body:has(.m16-home) .ms-footer {
  margin-top: 86px;
  padding-top: 38px;
  padding-bottom: 52px;
  border-top-color: rgba(21,34,70,.09);
}

body:has(.m16-home) .ms-footer .ms-brand {
  transition: transform .25s var(--m16-polish-ease);
}

body:has(.m16-home) .ms-footer .ms-brand:hover {
  transform: translateY(-2px);
}

body:has(.m16-home) .ms-footer a {
  transition: color .2s ease,transform .2s ease;
}

body:has(.m16-home) .ms-footer a:hover {
  color: var(--m16-blue);
  transform: translateX(2px);
}

@keyframes m16-editor-float {
  0%,100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(0,-7px,0); }
}

@keyframes m16-production-float {
  0%,100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@media (max-width: 1180px) {
  .m16-manifesto { padding-top: 78px; padding-bottom: 66px; }
  .m16-smartcut__steps article:not(:last-child)::after { display: none; }
  .m16-products { padding-top: 84px; }
  .m16-studio-story { margin-top: 84px; }
  .m16-sheet-story { padding-top: 84px; padding-bottom: 84px; }
}

@media (max-width: 980px) {
  body:has(.m16-home) .ms-header.is-m16-scrolled { width: calc(100vw - 24px); }
  .m16-manifesto::before { left: 20px; right: 20px; }
  .m16-manifesto > div:last-child { padding-left: 0; border-left: 0; }
  .m16-smartcut .m16-section-head { grid-template-columns: 1fr; }
  .m16-smartcut__steps { grid-template-columns: 1fr !important; }
  .m16-smartcut__steps article { min-height: 0; }
  .m16-smartcut__steps article:hover { transform: translateY(-3px); }
  .m16-smartcut__image { min-height: 260px; }
  .m16-smartcut__image img { height: 260px; }
  .m16-smartcut__steps article.is-cutout .m16-smartcut__image img,
  .m16-smartcut__steps article.is-finished .m16-smartcut__image img { height: 235px; }
}

@media (max-width: 680px) {
  body:has(.m16-home) { background-attachment: scroll; }
  body:has(.m16-home) .ms-header.is-m16-scrolled { width: calc(100vw - 16px); margin-top: 5px; }
  .m16-home [data-m16-reveal] { transform: translate3d(0,18px,0); }
  .m16-manifesto { padding-top: 68px; padding-bottom: 54px; }
  .m16-manifesto::before { top: 36px; left: 16px; right: 16px; }
  .m16-smartcut { padding: 24px 14px; }
  .m16-smartcut .m16-section-head { margin-bottom: 27px; }
  .m16-smartcut__steps { gap: 14px; }
  .m16-smartcut__steps article { padding: 10px 10px 15px; }
  .m16-smartcut__steps article > div:last-child { padding: 18px 8px 6px; }
  .m16-products { padding-top: 70px; }
  .m16-products__grid { gap: 14px; }
  .m16-products__grid .is-featured .m16-product__visual { min-height: 285px; }
  .m16-studio-story { margin-top: 70px; }
  .m16-sheet-story { padding-top: 72px; padding-bottom: 72px; }
  .m16-final { padding: 38px 26px; }
  body:has(.m16-home) .ms-footer { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .m16-home [data-m16-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .m16-editor-canvas img,
  .m16-production__art img {
    animation: none !important;
  }
  .m16-hero__lifestyle,
  .m16-hero__studio-card,
  .m16-editor-window,
  .m16-sheet-story__visual img,
  .m16-production__art img {
    transform: none !important;
    transition: none !important;
  }
}
