/* Magnet Studio M1.3 — spacious polish pass and rebuilt lower homepage. */

.ms-app:has(.ms-hero) main {
  padding-bottom: 0;
}

/* Give the opening composition more editorial breathing room. */
.ms-app:has(.ms-hero) .ms-hero {
  min-height: 620px;
}

.ms-app:has(.ms-hero) .ms-hero__copy {
  padding: 76px 64px 92px 54px;
}

.ms-app:has(.ms-hero) .ms-hero__visual {
  min-height: 620px;
}

.ms-app:has(.ms-hero) .ms-proof-pills {
  margin-top: 24px;
  gap: 10px 22px;
}

/* Benefits are no longer squeezed into the hero corner. */
.ms-app:has(.ms-hero) .ms-benefits {
  width: min(1180px, calc(100vw - 64px));
  margin: 24px auto 68px;
  padding: 0;
  grid-template-columns: repeat(4, 1fr);
}

.ms-app:has(.ms-hero) .ms-benefits article {
  padding: 10px 18px;
  justify-content: center;
}

.ms-app:has(.ms-hero) .ms-benefits b::after {
  font-size: 11px !important;
}

.ms-app:has(.ms-hero) .ms-benefits small::after {
  font-size: 9px !important;
}

/* Smart Cut: larger, calmer and visually explicit. */
.ms-app:has(.ms-hero) #smart-cut {
  min-height: 340px;
  margin-top: 0;
  padding: 48px 56px 54px;
  grid-template-columns: minmax(650px, 1.7fr) minmax(330px, .8fr);
  gap: 58px;
  border-radius: 32px;
  background: linear-gradient(112deg, #f5f8ff 0%, #fbfcff 60%, #fff 100%);
}

.ms-app:has(.ms-hero) #smart-cut .ms-transform {
  gap: 28px;
  align-items: center;
}

.ms-app:has(.ms-hero) #smart-cut .ms-transform > article,
.ms-app:has(.ms-hero) #smart-cut .ms-transform__flow {
  min-height: 232px;
  background-size: 82% auto;
  overflow: visible;
}

.ms-app:has(.ms-hero) #smart-cut .ms-transform > article:first-child {
  background-size: 88% auto;
}

.ms-app:has(.ms-hero) #smart-cut .ms-transform__flow {
  background-size: 72% auto;
}

.ms-app:has(.ms-hero) #smart-cut .ms-transform > article:last-child {
  background-size: 72% auto;
  filter:
    drop-shadow(0 0 1px #fff)
    drop-shadow(0 0 4px #fff)
    drop-shadow(0 0 9px rgba(255,255,255,.98))
    drop-shadow(0 15px 18px rgba(35,48,84,.18));
}

.ms-app:has(.ms-hero) #smart-cut .ms-transform > article:first-child::before,
.ms-app:has(.ms-hero) #smart-cut .ms-transform__flow::before {
  content: '→';
  position: absolute;
  right: -28px;
  top: 47%;
  z-index: 3;
  color: #3158ff;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.ms-app:has(.ms-hero) #smart-cut .ms-transform > article::after,
.ms-app:has(.ms-hero) #smart-cut .ms-transform__flow::after {
  bottom: -4px;
  font-size: 11px;
}

.ms-app:has(.ms-hero) #smart-cut .ms-section-title h2::after {
  font-size: clamp(32px, 2.8vw, 44px);
}

.ms-app:has(.ms-hero) #smart-cut .ms-section-title p::after {
  max-width: 390px;
  font-size: 14px;
}

/* Product row: preserve the approved style but stop squeezing its content. */
.ms-app:has(.ms-hero) #smart-cut + .ms-section {
  padding: 76px 0 108px;
}

.ms-app:has(.ms-hero) #smart-cut + .ms-section .ms-section-title {
  margin-bottom: 30px;
}

.ms-app:has(.ms-hero) #smart-cut + .ms-section .ms-product-grid {
  gap: 22px;
}

.ms-app:has(.ms-hero) #smart-cut + .ms-section .ms-product-grid > article {
  min-height: 330px;
  padding: 0 20px 22px;
  border-radius: 26px;
}

.ms-app:has(.ms-hero) #smart-cut + .ms-section .ms-product-grid__art {
  min-height: 218px;
  margin: 0 -20px;
}

.ms-app:has(.ms-hero) #smart-cut + .ms-section .ms-product-grid h3 {
  margin-top: 14px;
  font-size: 19px;
}

.ms-app:has(.ms-hero) #smart-cut + .ms-section .ms-product-grid p {
  max-width: 92%;
  font-size: 12px;
  line-height: 1.48;
}

/* Real magnetic sheet showcase. Old neon children remain in DOM only for compatibility. */
.ms-app:has(.ms-hero) .ms-sheet {
  min-height: 560px;
  margin-top: 0;
  padding: 74px 70px;
  grid-template-columns: minmax(360px, .78fr) minmax(560px, 1.22fr);
  gap: 64px;
  border-radius: 38px;
  background:
    radial-gradient(circle at 16% 16%, rgba(83,111,255,.16), transparent 34%),
    linear-gradient(120deg, #eef3ff 0%, #f8f7f6 54%, #fff2db 100%);
  box-shadow: 0 26px 70px rgba(31,43,79,.10);
  overflow: hidden;
}

.ms-app:has(.ms-hero) .ms-sheet > div:first-child {
  position: relative;
  z-index: 2;
}

.ms-app:has(.ms-hero) .ms-sheet h2 {
  max-width: 560px;
  margin-top: 14px;
  font-size: clamp(50px, 5vw, 76px);
  line-height: .98;
}

.ms-app:has(.ms-hero) .ms-sheet p {
  max-width: 500px;
  margin-top: 22px;
  font-size: 16px;
}

.ms-app:has(.ms-hero) .ms-sheet .ms-button {
  margin-top: 28px;
}

.ms-app:has(.ms-hero) .ms-sheet__paper {
  min-height: 430px;
  padding: 0;
  position: relative;
  display: block;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.ms-app:has(.ms-hero) .ms-sheet__paper > * {
  display: none !important;
}

.ms-app:has(.ms-hero) .ms-sheet__paper::before,
.ms-app:has(.ms-hero) .ms-sheet__paper::after {
  content: '';
  width: 76%;
  aspect-ratio: 4 / 3;
  position: absolute;
  border-radius: 26px;
  background: url('/assets/magnet/homepage/product-magnetic-sheet.webp') center / contain no-repeat;
  filter: drop-shadow(0 26px 28px rgba(35,48,84,.20));
}

.ms-app:has(.ms-hero) .ms-sheet__paper::before {
  left: 1%;
  top: 1%;
  transform: rotate(-7deg);
}

.ms-app:has(.ms-hero) .ms-sheet__paper::after {
  right: -2%;
  bottom: -3%;
  transform: rotate(6deg) scale(.92);
}

/* Replace the old icon dashboard with four visual story cards. */
.ms-app:has(.ms-hero) .ms-sheet + .ms-section {
  padding: 118px 0 112px;
}

.ms-app:has(.ms-hero) .ms-sheet + .ms-section .ms-section-title {
  max-width: 760px;
  margin-bottom: 48px;
}

.ms-app:has(.ms-hero) .ms-sheet + .ms-section .ms-section-title h2 {
  font-size: clamp(46px, 4.6vw, 68px);
}

.ms-app:has(.ms-hero) .ms-use-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.ms-app:has(.ms-hero) .ms-use-grid article {
  min-height: 360px;
  padding: 236px 32px 30px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(18,30,65,.06);
  border-radius: 30px;
  background: #f7f8fc;
  box-shadow: 0 20px 55px rgba(31,43,79,.08);
}

.ms-app:has(.ms-hero) .ms-use-grid article:nth-child(n+5) {
  display: none;
}

.ms-app:has(.ms-hero) .ms-use-grid article::before {
  content: '';
  height: 220px;
  position: absolute;
  inset: 0 0 auto;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.ms-app:has(.ms-hero) .ms-use-grid article:nth-child(1) {
  background: #edf7ff;
}
.ms-app:has(.ms-hero) .ms-use-grid article:nth-child(1)::before {
  background-image: url('/assets/magnet/homepage/product-photo-magnet.webp');
}

.ms-app:has(.ms-hero) .ms-use-grid article:nth-child(2) {
  background: #fbf2ed;
}
.ms-app:has(.ms-hero) .ms-use-grid article:nth-child(2)::before {
  background-image: url('/assets/magnet/homepage/product-custom-shape.webp');
}

.ms-app:has(.ms-hero) .ms-use-grid article:nth-child(3) {
  background: #fff1fa;
}
.ms-app:has(.ms-hero) .ms-use-grid article:nth-child(3)::before {
  background-image: url('/assets/magnet/homepage/product-magnetic-sheet.webp');
}

.ms-app:has(.ms-hero) .ms-use-grid article:nth-child(4) {
  background: #fbf5e8;
}
.ms-app:has(.ms-hero) .ms-use-grid article:nth-child(4)::before {
  background-image: url('/assets/magnet/homepage/product-business-magnet.webp');
}

.ms-app:has(.ms-hero) .ms-use-grid svg {
  display: none;
}

.ms-app:has(.ms-hero) .ms-use-grid h3 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.035em;
}

.ms-app:has(.ms-hero) .ms-use-grid p {
  max-width: 460px;
  margin-top: 10px;
  color: #59637a;
  font-size: 14px;
  line-height: 1.55;
}

/* Bright editorial CTA using the same physical product language as the hero. */
.ms-app:has(.ms-hero) .ms-final {
  min-height: 360px;
  margin-top: 0;
  padding: 72px 64px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(420px, .9fr) minmax(440px, 1.1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(18,30,65,.06);
  border-radius: 38px;
  color: #101a3b;
  background:
    radial-gradient(circle at 14% 20%, rgba(76,99,255,.16), transparent 34%),
    linear-gradient(120deg, #f7f9ff 0%, #fff 58%, #fff2f8 100%);
  box-shadow: 0 24px 70px rgba(31,43,79,.09);
}

.ms-app:has(.ms-hero) .ms-final::after {
  content: '';
  position: absolute;
  inset: 22px 18px 18px 48%;
  background: url('/assets/magnet/homepage/hero-magnets-cutout.webp') center / contain no-repeat;
  filter: drop-shadow(0 24px 28px rgba(31,43,79,.18));
}

.ms-app:has(.ms-hero) .ms-final > div,
.ms-app:has(.ms-hero) .ms-final > a {
  position: relative;
  z-index: 2;
}

.ms-app:has(.ms-hero) .ms-final span {
  color: #3158ff;
}

.ms-app:has(.ms-hero) .ms-final h2 {
  max-width: 610px;
  color: #101a3b;
  font-size: clamp(50px, 5vw, 76px);
  line-height: .98;
}

.ms-app:has(.ms-hero) .ms-final > a {
  justify-self: start;
  align-self: end;
  margin-left: 0;
  color: #fff;
  background: linear-gradient(105deg, #3158ff, #6e4dff 52%, #f238a8);
}

/* Footer is now a continuation of the light product site, not a dark app dashboard. */
.ms-app:has(.ms-hero) + .ms-footer,
.ms-app:has(.ms-hero) .ms-footer {
  margin-top: 86px;
}

.ms-app:has(.ms-hero) .ms-footer {
  padding: 54px 10px 64px;
  border-top: 1px solid rgba(18,30,65,.09);
  border-radius: 0;
  color: #101a3b;
  background: #fff;
  box-shadow: none;
}

.ms-app:has(.ms-hero) .ms-footer p,
.ms-app:has(.ms-hero) .ms-footer a,
.ms-app:has(.ms-hero) .ms-footer small,
.ms-app:has(.ms-hero) .ms-footer span {
  color: #687187;
}

.ms-app:has(.ms-hero) .ms-footer > div:last-child span,
.ms-app:has(.ms-hero) .ms-footer > div:last-child small {
  font-size: 0;
}

.ms-app:has(.ms-hero) .ms-footer > div:last-child span::after {
  content: 'Magnet Studio M1.3';
  font-size: 12px;
  font-weight: 700;
}

.ms-app:has(.ms-hero) .ms-footer > div:last-child small::after {
  content: 'Světlý produktový web a jednotná nativní aplikace.';
  display: block;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 1120px) {
  .ms-app:has(.ms-hero) #smart-cut {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .ms-app:has(.ms-hero) .ms-sheet {
    grid-template-columns: 1fr;
  }

  .ms-app:has(.ms-hero) .ms-sheet__paper {
    min-height: 480px;
  }

  .ms-app:has(.ms-hero) .ms-final {
    grid-template-columns: 1fr;
    padding-bottom: 330px;
  }

  .ms-app:has(.ms-hero) .ms-final::after {
    inset: auto 16px 10px 16px;
    height: 320px;
  }
}

@media (max-width: 820px) {
  .ms-app:has(.ms-hero) .ms-hero__copy {
    padding: 52px 24px 42px;
  }

  .ms-app:has(.ms-hero) .ms-benefits {
    width: calc(100% - 36px);
    margin-bottom: 52px;
  }

  .ms-app:has(.ms-hero) #smart-cut {
    padding: 36px 22px 48px;
  }

  .ms-app:has(.ms-hero) #smart-cut .ms-transform > article:first-child::before,
  .ms-app:has(.ms-hero) #smart-cut .ms-transform__flow::before {
    content: '↓';
    right: 50%;
    top: auto;
    bottom: -30px;
    transform: translateX(50%);
  }

  .ms-app:has(.ms-hero) #smart-cut .ms-transform {
    gap: 44px;
  }

  .ms-app:has(.ms-hero) #smart-cut + .ms-section {
    padding-bottom: 82px;
  }

  .ms-app:has(.ms-hero) .ms-sheet {
    width: calc(100% - 28px);
    padding: 50px 28px;
  }

  .ms-app:has(.ms-hero) .ms-sheet__paper {
    min-height: 360px;
  }

  .ms-app:has(.ms-hero) .ms-use-grid {
    grid-template-columns: 1fr;
  }

  .ms-app:has(.ms-hero) .ms-final {
    width: calc(100% - 28px);
    padding: 52px 28px 300px;
  }

  .ms-app:has(.ms-hero) .ms-footer {
    width: calc(100% - 28px);
  }
}

@media (max-width: 520px) {
  .ms-app:has(.ms-hero) .ms-benefits {
    grid-template-columns: 1fr 1fr;
  }

  .ms-app:has(.ms-hero) #smart-cut .ms-transform > article,
  .ms-app:has(.ms-hero) #smart-cut .ms-transform__flow {
    min-height: 220px;
  }

  .ms-app:has(.ms-hero) #smart-cut + .ms-section .ms-product-grid > article {
    min-height: 310px;
  }

  .ms-app:has(.ms-hero) .ms-sheet h2,
  .ms-app:has(.ms-hero) .ms-final h2 {
    font-size: 48px;
  }

  .ms-app:has(.ms-hero) .ms-sheet__paper {
    min-height: 280px;
  }

  .ms-app:has(.ms-hero) .ms-use-grid article {
    min-height: 330px;
    padding-top: 215px;
  }
}
