/* Magnet Studio M1.3 — homepage art direction matched to the approved reference. */

:root {
  --m13-ink: #101a3b;
  --m13-copy: #4f5971;
  --m13-blue: #3158ff;
  --m13-pink: #f52fab;
  --m13-line: rgba(18, 30, 65, .10);
}

body {
  background: #ffffff;
}

.ms-topbar {
  display: none !important;
}

.ms-header {
  width: 100%;
  min-height: 72px;
  margin: 0;
  padding: 10px clamp(24px, 3.6vw, 58px);
  position: sticky;
  top: 0;
  border: 0;
  border-radius: 0 0 22px 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 35px rgba(31, 43, 79, .08);
  backdrop-filter: blur(22px) saturate(160%);
}

.ms-brand {
  gap: 11px;
}

.ms-brand__mark {
  width: 42px;
  height: 42px;
  transform: none;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #3158ff 5%, #8a4cff 58%, #ef45ad 100%);
  box-shadow: 0 9px 22px rgba(65, 76, 230, .24), inset 0 1px 0 rgba(255, 255, 255, .42);
}

.ms-brand__mark i {
  display: none;
}

.ms-brand__mark::after {
  content: 'M';
  width: auto;
  height: auto;
  position: static;
  color: #fff;
  background: none;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.ms-brand > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1;
}

.ms-brand b,
.ms-brand small {
  margin: 0;
  color: var(--m13-ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.025em;
}

.ms-nav {
  gap: clamp(4px, 1.2vw, 20px);
}

.ms-nav a,
.ms-account-link {
  padding: 10px 8px;
  color: #4f5669;
  font-size: 13px;
  font-weight: 500;
}

.ms-nav a:hover,
.ms-nav a.is-active,
.ms-account-link:hover {
  color: var(--m13-ink);
  background: transparent;
}

.ms-account-link svg {
  display: none;
}

.ms-header__actions {
  gap: 10px;
}

.ms-account-link,
.ms-cart-link {
  min-height: 42px;
  padding-inline: 16px;
  border: 1px solid var(--m13-line);
  border-radius: 15px;
  background: rgba(255,255,255,.78);
}

.ms-cart-link {
  min-width: 92px;
  justify-content: center;
}

.ms-button {
  border-radius: 14px;
  background: linear-gradient(105deg, #3158ff 0%, #694cff 48%, #f238a8 100%);
  box-shadow: 0 12px 26px rgba(70, 73, 225, .21), inset 0 1px 0 rgba(255,255,255,.34);
}

.ms-button--small {
  min-height: 44px;
  padding-inline: 18px;
}

/* --- Hero --- */
.ms-app:has(.ms-hero) .ms-container {
  width: min(1420px, calc(100vw - 40px));
}

.ms-hero {
  min-height: 550px;
  margin-top: 0;
  padding: 0;
  grid-template-columns: minmax(430px, .78fr) minmax(620px, 1.22fr);
  gap: 0;
  align-items: stretch;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}

.ms-hero::after {
  display: none;
}

.ms-hero__copy {
  padding: 56px 48px 118px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ms-kicker {
  margin-bottom: 18px;
  color: #607091;
  font-size: 0;
  letter-spacing: .09em;
}

.ms-kicker::after {
  content: 'VYROBENO V ČESKU S LÁSKOU';
  font-size: 10px;
  font-weight: 700;
}

.ms-kicker svg {
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 999px;
  color: var(--m13-blue);
  background: #edf1ff;
}

.ms-hero h1 {
  margin: 0;
  font-size: 0;
}

.ms-hero h1::after {
  content: 'Z fotky\A magnetka.';
  display: block;
  white-space: pre-line;
  color: var(--m13-ink);
  font-size: clamp(58px, 5.3vw, 88px);
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.058em;
}

.ms-hero h1::first-line {
  color: var(--m13-ink);
}

.ms-hero h1::after {
  background: linear-gradient(96deg, var(--m13-blue) 18%, #7854ff 55%, var(--m13-pink) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ms-hero__copy > p {
  max-width: 520px;
  margin: 20px 0 0;
  color: var(--m13-copy);
  font-size: 0;
  line-height: 1.6;
}

.ms-hero__copy > p::before {
  content: 'Bez pozadí. Přesně na tvar.';
  display: block;
  margin-bottom: 12px;
  color: var(--m13-ink);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.ms-hero__copy > p::after {
  content: 'Nahraj fotku, vyber tvar a my ji proměníme v prémiovou magnetku – jednotlivě nebo na archu.';
  display: block;
  max-width: 460px;
  font-size: 15px;
}

.ms-actions {
  margin-top: 26px;
}

.ms-actions .ms-button {
  min-height: 48px;
  padding-inline: 20px;
}

.ms-actions .ms-button:nth-child(2) {
  min-width: 168px;
  font-size: 0;
}

.ms-actions .ms-button:nth-child(2)::after {
  content: 'Jak to funguje';
  font-size: 14px;
}

.ms-hero__visual {
  min-height: 550px;
  border-radius: 0;
  background-image: url('/assets/magnet/homepage/hero-fridge-magnets.webp');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.ms-hero__visual::before,
.ms-hero__visual > * {
  display: none !important;
}

/* Benefits sit visually inside the lower-left hero area. */
.ms-benefits {
  width: min(520px, calc(42vw - 42px));
  margin: -102px auto 26px max(24px, calc((100vw - min(1420px, calc(100vw - 40px))) / 2 + 42px));
  position: relative;
  z-index: 5;
  grid-template-columns: repeat(4, 1fr);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.ms-benefits article {
  min-width: 0;
  padding: 7px 8px;
  gap: 8px;
  border: 0;
  align-items: flex-start;
}

.ms-benefits svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #435dff;
}

.ms-benefits b,
.ms-benefits small {
  font-size: 0;
}

.ms-benefits b::after,
.ms-benefits small::after {
  display: block;
}

.ms-benefits article:nth-child(1) b::after { content: 'Rychlá výroba'; font-size: 10px; }
.ms-benefits article:nth-child(1) small::after { content: 'Expedice od 24 h'; font-size: 8px; }
.ms-benefits article:nth-child(2) b::after { content: 'Prémiová kvalita'; font-size: 10px; }
.ms-benefits article:nth-child(2) small::after { content: 'Odolné materiály'; font-size: 8px; }
.ms-benefits article:nth-child(3) b::after { content: 'Bezpečná platba'; font-size: 10px; }
.ms-benefits article:nth-child(3) small::after { content: 'SSL šifrování'; font-size: 8px; }
.ms-benefits article:nth-child(4) b::after { content: 'Spokojenost'; font-size: 10px; }
.ms-benefits article:nth-child(4) small::after { content: 'Ruční kontrola proofu'; font-size: 8px; }

/* --- Smart Cut strip --- */
#smart-cut {
  min-height: 230px;
  margin-top: 6px;
  padding: 24px 34px;
  display: grid;
  grid-template-columns: minmax(620px, 1.75fr) minmax(310px, .8fr);
  gap: 30px;
  align-items: center;
  border: 1px solid rgba(61, 87, 215, .06);
  border-radius: 28px;
  background: linear-gradient(110deg, #f4f7ff 0%, #f9fbff 58%, #fff 100%);
  box-shadow: 0 15px 42px rgba(41, 55, 102, .07);
}

#smart-cut .ms-section-title {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

#smart-cut .ms-section-title > span,
#smart-cut .ms-section-title h2,
#smart-cut .ms-section-title p {
  font-size: 0;
}

#smart-cut .ms-section-title > span::after {
  content: 'MAGIE SMART CUT';
  font-size: 10px;
  color: var(--m13-blue);
  letter-spacing: .13em;
}

#smart-cut .ms-section-title h2::after {
  content: 'Chytrý výřez, který dává smysl';
  display: block;
  margin-top: 9px;
  color: var(--m13-ink);
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

#smart-cut .ms-section-title p::after {
  content: 'Zachováme důležité detaily jako nožky, tlapky, trávu nebo kola. Výsledek je čistý, přesný a připravený k výrobě.';
  display: block;
  margin-top: 14px;
  color: var(--m13-copy);
  font-size: 13px;
  line-height: 1.55;
}

#smart-cut .ms-transform {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

#smart-cut .ms-transform > article,
#smart-cut .ms-transform__flow {
  min-height: 176px;
  padding: 0;
  position: relative;
  display: block;
  border: 0;
  border-radius: 17px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
}

#smart-cut .ms-transform > article:first-child {
  background-image: url('/assets/magnet/homepage/smartcut-source-photo.webp');
}

#smart-cut .ms-transform__flow {
  background-image: url('/assets/magnet/homepage/smartcut-object-cutout.webp');
}

#smart-cut .ms-transform > article:last-child {
  background-image: url('/assets/magnet/homepage/smartcut-finished-magnet.webp');
}

#smart-cut .ms-transform > article > *,
#smart-cut .ms-transform__flow > * {
  display: none !important;
}

#smart-cut .ms-transform > article::after,
#smart-cut .ms-transform__flow::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  color: var(--m13-ink);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

#smart-cut .ms-transform > article:first-child::after { content: '1. Nahraj fotku'; }
#smart-cut .ms-transform__flow::after { content: '2. Odstraníme pozadí'; }
#smart-cut .ms-transform > article:last-child::after { content: '3. Přidáme obrys a je hotovo!'; }

/* --- Product row --- */
#smart-cut + .ms-section {
  padding: 34px 0 72px;
}

#smart-cut + .ms-section .ms-section-title {
  max-width: none;
  margin-bottom: 18px;
}

#smart-cut + .ms-section .ms-section-title > span,
#smart-cut + .ms-section .ms-section-title h2 {
  font-size: 0;
}

#smart-cut + .ms-section .ms-section-title > span::after {
  content: 'VYBERTE SI, CO CHCETE VYTVOŘIT';
  font-size: 10px;
  color: var(--m13-blue);
  letter-spacing: .14em;
}

#smart-cut + .ms-section .ms-section-title h2::after {
  content: 'Naše magnetky pro každou příležitost';
  display: block;
  margin-top: 7px;
  color: var(--m13-ink);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.06;
  letter-spacing: -.042em;
}

#smart-cut + .ms-section .ms-product-grid {
  gap: 16px;
}

#smart-cut + .ms-section .ms-product-grid > article {
  min-height: 260px;
  padding: 0 16px 16px;
  border: 0;
  border-radius: 22px;
  box-shadow: none;
  overflow: hidden;
}

#smart-cut + .ms-section .ms-product-grid > article:nth-child(1) { background: #fbf2ed; }
#smart-cut + .ms-section .ms-product-grid > article:nth-child(2) { background: #eaf7ff; }
#smart-cut + .ms-section .ms-product-grid > article:nth-child(3) { background: #fff0fa; }
#smart-cut + .ms-section .ms-product-grid > article:nth-child(4) { background: #fbf5e8; }

#smart-cut + .ms-section .ms-product-grid__top {
  display: none;
}

#smart-cut + .ms-section .ms-product-grid__art {
  min-height: 172px;
  margin: 0 -16px;
  border-radius: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

#smart-cut + .ms-section .ms-product-grid > article:nth-child(1) .ms-product-grid__art { background-image: url('/assets/magnet/homepage/product-custom-shape.webp'); }
#smart-cut + .ms-section .ms-product-grid > article:nth-child(2) .ms-product-grid__art { background-image: url('/assets/magnet/homepage/product-photo-magnet.webp'); }
#smart-cut + .ms-section .ms-product-grid > article:nth-child(3) .ms-product-grid__art { background-image: url('/assets/magnet/homepage/product-magnetic-sheet.webp'); }
#smart-cut + .ms-section .ms-product-grid > article:nth-child(4) .ms-product-grid__art { background-image: url('/assets/magnet/homepage/product-business-magnet.webp'); }

#smart-cut + .ms-section .ms-product-grid__art > * {
  display: none !important;
}

#smart-cut + .ms-section .ms-product-grid h3 {
  margin: 10px 0 0;
  font-size: 17px;
  line-height: 1.15;
}

#smart-cut + .ms-section .ms-product-grid p {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.4;
}

#smart-cut + .ms-section .ms-product-grid > article > a {
  width: 34px;
  height: 34px;
  margin: -36px 0 0 auto;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--m13-ink);
  background: rgba(255,255,255,.9);
  font-size: 0;
  box-shadow: 0 6px 16px rgba(26, 39, 80, .08);
}

#smart-cut + .ms-section .ms-product-grid > article > a svg {
  width: 15px;
}

/* Keep the next sections quiet so the approved visual direction remains dominant. */
.ms-sheet {
  margin-top: 10px;
}

@media (max-width: 1120px) {
  .ms-nav { display: none; }
  .ms-menu { display: grid; }
  .ms-hero { grid-template-columns: 1fr 1.15fr; }
  .ms-hero__copy { padding-inline: 28px; }
  .ms-benefits {
    width: calc(48vw - 34px);
    margin-left: 30px;
  }
  #smart-cut {
    grid-template-columns: 1fr;
  }
  #smart-cut .ms-section-title,
  #smart-cut .ms-transform {
    grid-column: 1;
  }
  #smart-cut .ms-section-title { grid-row: 1; }
  #smart-cut .ms-transform { grid-row: 2; }
}

@media (max-width: 820px) {
  .ms-header {
    padding-inline: 16px;
  }
  .ms-account-link,
  .ms-cart-link span {
    display: none;
  }
  .ms-hero {
    width: 100% !important;
    grid-template-columns: 1fr;
  }
  .ms-hero__copy {
    padding: 48px 24px 32px;
  }
  .ms-hero__visual {
    min-height: 430px;
    background-position: 56% center;
  }
  .ms-benefits {
    width: calc(100% - 40px);
    margin: 16px auto 30px;
    grid-template-columns: repeat(2, 1fr);
  }
  #smart-cut {
    width: calc(100% - 28px) !important;
    padding: 24px 18px 34px;
  }
  #smart-cut .ms-transform {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  #smart-cut .ms-transform > article,
  #smart-cut .ms-transform__flow {
    min-height: 210px;
  }
  #smart-cut + .ms-section .ms-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .ms-brand b,
  .ms-brand small { font-size: 12px; }
  .ms-header__actions .ms-button--small { display: none; }
  .ms-hero h1::after { font-size: 54px; }
  .ms-hero__visual { min-height: 340px; }
  #smart-cut + .ms-section .ms-product-grid {
    grid-template-columns: 1fr;
  }
}
