.market-home {
  width: min(100%, 1400px);
  margin-inline: auto;
  padding: 18px var(--gutter) 104px;
}

.market-hero {
  --hero-x: 0px;
  --hero-y: 0px;
  --hero-scroll: 0;
  position: relative;
  isolation: isolate;
  min-height: clamp(540px, calc(100dvh - var(--header) - 36px), 680px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius-card);
  background: #f4f7fb;
  box-shadow: 0 28px 72px rgb(31 48 87 / .12);
}

.market-hero-video{position:absolute;z-index:-1;inset:-6%;width:112%;height:112%;object-fit:cover;opacity:.86;transform:translate3d(var(--hero-x),calc(var(--hero-y) + var(--hero-scroll) * -34px),0) scale(calc(1.04 + var(--hero-scroll) * .08)) rotate(calc(var(--hero-scroll) * -2deg));filter:saturate(1.16) contrast(1.02) brightness(1.1);transform-origin:center center;will-change:transform}

.market-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgb(248 250 253 / .9) 0%, rgb(248 250 253 / .78) 34%, rgb(248 250 253 / .28) 50%, transparent 67%);
  pointer-events: none;
}

.market-hero-copy {
  width: min(55%, 760px);
  padding: clamp(42px, 5vw, 72px);
  color: #111827;
}

.market-kicker {
  margin: 0 0 20px;
  color: #155eef;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 450;
  letter-spacing: .015em;
}

.market-hero h1 {
  max-width: 730px;
  margin: 0;
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 380;
  letter-spacing: -.058em;
  line-height: .96;
  text-wrap: balance;
}

.market-hero-copy > p:not(.market-kicker) {
  max-width: 500px;
  margin: 24px 0 0;
  color: #526075;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.5;
}

.market-hero .button {
  margin-top: 30px;
}

.category-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.category-rail a {
  min-width: 0;
  min-height: 62px;
  display: flex;
  align-items: center;
  padding: 0 clamp(12px, 1.6vw, 22px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}

.category-rail a + a {
  border-left: 1px solid var(--line);
}

.category-rail a:hover,
.category-rail a:focus-visible {
  background: color-mix(in srgb, var(--accent-soft) 48%, transparent);
  color: var(--accent);
}

.offer-section,
.case-shelf {
  padding-top: clamp(78px, 9vw, 124px);
  scroll-margin-top: calc(var(--header) + 24px);
}

.market-section-heading {
  min-width: 0;
  display: flex;
  gap: 28px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
}

.market-section-heading > div {
  min-width: 0;
}

.market-section-heading h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 4.6vw, 64px);
  font-weight: 370;
  letter-spacing: -.052em;
  line-height: .98;
  text-wrap: balance;
  overflow-wrap: anywhere;
  white-space: normal;
}

.market-section-heading p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.offer-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 3px;
  scrollbar-width: none;
}

.offer-filters::-webkit-scrollbar {
  display: none;
}

.offer-filters button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}

.offer-filters button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.offer-filters button:active {
  transform: scale(.98);
}

.offer-filters button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--card);
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 20px;
  align-items: stretch;
}

.offer-card {
  min-width: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: 0 14px 34px rgb(36 55 97 / .065);
  transition: transform .28s cubic-bezier(.16, 1, .3, 1), box-shadow .28s ease, border-color .28s ease;
}

.offer-card:nth-child(1),
.offer-card:nth-child(2),
.offer-card:nth-child(3),
.offer-card:nth-child(4),
.offer-card:nth-child(5),
.offer-card:nth-child(6) {
  grid-column: auto;
}

.offer-card:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  box-shadow: 0 24px 52px rgb(36 55 97 / .13);
  transform: translateY(-4px);
}

.offer-card[hidden] {
  display: none;
}

@media (min-width: 1121px) {
  .offer-grid[data-visible-count="1"] .offer-card:not([hidden]) {
    grid-column: span 1;
  }

  .offer-grid[data-visible-count="2"] .offer-card:not([hidden]),
  .offer-grid[data-visible-count="4"] .offer-card:not([hidden]),
  .offer-grid[data-visible-count="5"] .offer-card:not([hidden]) {
    grid-column: auto;
  }

  .offer-grid[data-visible-count="3"] .offer-card:not([hidden]) {
    grid-column: auto;
  }

  .offer-grid[data-visible-count="5"] .offer-card-featured:not([hidden]) {
    grid-column: auto;
  }
}

.offer-card-media {
  aspect-ratio: 4 / 3;
  display: block;
  overflow: hidden;
  background: var(--surface-deep);
}

.offer-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}

.offer-card:nth-child(2) .offer-card-media img {
  object-position: center 42%;
}

.offer-card:nth-child(3) .offer-card-media img {
  object-position: center 46%;
}

.offer-card:nth-child(4) .offer-card-media img {
  object-position: center 58%;
}

.offer-card:nth-child(5) .offer-card-media img {
  object-position: center 45%;
}

.offer-card:nth-child(6) .offer-card-media img {
  object-position: center 54%;
}

.offer-card:hover .offer-card-media img {
  transform: scale(1.025);
}

.offer-card-body {
  min-height: 238px;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.4vw, 32px);
}

.offer-card-body p {
  margin: 0;
  color: var(--accent);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: .015em;
}

.offer-card-body h3 {
  max-width: 620px;
  margin: 10px 0 0;
  font-size: clamp(25px, 2.6vw, 38px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.offer-card-body span {
  max-width: 620px;
  margin: 14px 0 28px;
  color: var(--muted);
  font-size: 15px;
}

.offer-card-body > a {
  width: max-content;
  margin-top: auto;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 5px;
}

.offer-card-body > a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.offer-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 46px 24px;
  background: var(--card);
  color: var(--muted);
  text-align: center;
}

.market-all-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.market-all-link:hover {
  border-color: currentColor;
}

.case-shelf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(30px, 4vw, 52px);
  align-items: start;
}

.case-shelf article {
  min-width: 0;
}

.case-shelf article a {
  color: inherit;
  text-decoration: none;
}

.case-featured a {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.case-featured img {
  width: 100%;
  aspect-ratio: 16 / 11;
  flex: 0 0 auto;
  min-height: 0;
  display: block;
  border-radius: var(--radius-card);
  object-fit: cover;
  object-position: center 52%;
  background: var(--surface-deep);
  box-shadow: 0 18px 44px rgb(36 55 97 / .08);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease;
}

.case-featured a:hover img {
  box-shadow: 0 26px 56px rgb(36 55 97 / .15);
  transform: translateY(-3px);
}

.case-featured div {
  padding-top: 18px;
}

.case-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.case-index article {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.case-index a {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 100%;
  padding: 0;
}

.case-index img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  background: var(--surface-deep);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}

.case-index article:nth-child(1) img {
  object-position: center 44%;
}

.case-index article:nth-child(2) img {
  object-position: center 46%;
}

.case-index article:nth-child(3) img {
  object-position: center 42%;
}

.case-index a:hover img {
  transform: scale(1.025);
}

.case-index div {
  padding: 18px;
}

.case-shelf p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.case-shelf h3 {
  margin: 6px 0 0;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.case-index h3 {
  font-size: clamp(20px, 1.7vw, 27px);
}

.trust-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: clamp(44px, 8vw, 120px);
  align-items: center;
  margin-top: clamp(82px, 10vw, 138px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(48px, 7vw, 88px) 0;
}

.trust-strip article {
  display: flex;
  flex-direction: column;
}

.trust-lead strong {
  max-width: 760px;
  font-size: clamp(42px, 5.6vw, 78px);
  font-weight: 370;
  letter-spacing: -.055em;
  line-height: .96;
}

.trust-strip span {
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 15px;
}

.trust-lead span {
  max-width: 560px;
  margin-top: 20px;
  font-size: 18px;
}

.trust-principles {
  display: grid;
}

.trust-principles article {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.trust-principles article:last-child {
  border-bottom: 1px solid var(--line);
}

.trust-principles strong {
  font-size: 20px;
  font-weight: 500;
}

.market-promo {
  display: flex;
  gap: 44px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  margin-top: clamp(76px, 9vw, 124px);
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: var(--radius-card);
  padding: clamp(38px, 5.5vw, 76px);
  background: #155eef;
  color: #f7f9ff;
  box-shadow: 0 28px 72px rgb(21 69 176 / .2);
}

.market-promo p {
  margin: 0 0 14px;
  color: #cbdcff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 450;
}

.market-promo h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 380;
  letter-spacing: -.055em;
  line-height: .96;
  text-wrap: balance;
}

.market-promo span {
  max-width: 640px;
  display: block;
  margin-top: 18px;
  color: #dce7ff;
  font-size: 17px;
}

.market-promo .button-light {
  flex: 0 0 auto;
}

@media (prefers-color-scheme: dark) {
  .market-hero {
    border-color: #2a3449;
    background: #1d2b43;
    box-shadow: 0 28px 72px rgb(0 0 0 / .32);
  }

  .market-hero::after {
    background: linear-gradient(90deg, rgb(24 37 61 / .88) 0%, rgb(24 37 61 / .72) 36%, rgb(24 37 61 / .3) 52%, transparent 70%);
  }

  .market-hero-copy {
    color: #f4f7ff;
  }

  .market-hero-copy > p:not(.market-kicker) {
    color: #b8c2d4;
  }

  .market-kicker {
    color: #78a8ff;
  }

  .offer-filters button.is-active {
    background: #eef3ff;
    border-color: #eef3ff;
    color: #10182a;
  }

  .market-promo {
    background: #174fb7;
    box-shadow: 0 28px 72px rgb(0 0 0 / .3);
  }
}

@media (max-width: 1120px) {
  .market-hero-copy {
    width: min(59%, 680px);
  }

  .market-hero h1 {
    font-size: clamp(46px, 5.6vw, 62px);
  }

  .category-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-rail a:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .category-rail a:nth-child(5),
  .category-rail a:nth-child(6) {
    border-top: 1px solid var(--line);
  }

  .offer-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .offer-card:nth-child(1),
  .offer-card:nth-child(2),
  .offer-card:nth-child(4),
  .offer-card:nth-child(5),
  .offer-card:nth-child(6) {
    grid-column: span 3;
  }

  .offer-card:nth-child(3) {
    grid-column: span 6;
  }

  .case-shelf-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .case-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .case-index article,
  .case-index article:last-child {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
  }

  .case-index a {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 100%;
    padding: 0;
  }

  .case-index img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0;
  }

  .case-index div {
    padding: 18px;
  }
}

@media (max-width: 767px) {
  .market-home {
    width: 100%;
    padding-top: 10px;
    padding-bottom: 72px;
  }

  .market-hero {
    min-height: min(620px, calc(100dvh - var(--header) - 16px));
    align-items: flex-end;
    border-radius: 20px;
  }

  .market-hero::after {
    background: linear-gradient(0deg, rgb(242 244 247 / .99) 0%, rgb(242 244 247 / .96) 43%, rgb(242 244 247 / .28) 76%, transparent 100%);
  }

  .market-hero-copy {
    width: 100%;
    padding: 26px 22px 24px;
  }

  .market-kicker {
    margin-bottom: 14px;
    font-size: 13px;
  }

  .market-hero h1 {
    max-width: 540px;
    font-size: clamp(40px, 11.3vw, 56px);
    line-height: .98;
  }

  .market-hero-copy > p:not(.market-kicker) {
    max-width: 430px;
    margin-top: 18px;
    font-size: 16px;
  }

  .market-hero .button {
    width: 100%;
    margin-top: 22px;
  }

  .category-rail {
    display: flex;
    overflow-x: auto;
    margin-inline: calc(-1 * var(--gutter));
    margin-top: 14px;
    padding-inline: var(--gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .category-rail::-webkit-scrollbar {
    display: none;
  }

  .category-rail a,
  .category-rail a:nth-child(4),
  .category-rail a:nth-child(5),
  .category-rail a:nth-child(6) {
    flex: 0 0 auto;
    min-height: 54px;
    border-top: 0;
    border-left: 1px solid var(--line);
    padding-inline: 18px;
    scroll-snap-align: start;
  }

  .category-rail a:last-child {
    border-right: 1px solid var(--line);
  }

  .offer-section,
  .case-shelf {
    padding-top: 76px;
  }

  .market-section-heading {
    display: grid;
    align-items: start;
    margin-bottom: 24px;
  }

  .market-section-heading h2 {
    max-width: min(100%, 330px);
    font-size: clamp(31px, 8.2vw, 36px);
    letter-spacing: -.032em;
    line-height: 1;
  }

  .offer-filters {
    max-width: 100%;
    width: 100%;
    margin-right: 0;
  }

  .offer-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .offer-card:nth-child(1),
  .offer-card:nth-child(2),
  .offer-card:nth-child(3),
  .offer-card:nth-child(4),
  .offer-card:nth-child(5),
  .offer-card:nth-child(6) {
    grid-column: auto;
  }

  .offer-card-media,
  .offer-card:nth-child(1) .offer-card-media,
  .offer-card:nth-child(4) .offer-card-media,
  .offer-card:nth-child(5) .offer-card-media {
    aspect-ratio: 1.45 / 1;
  }

  .offer-card-body {
    min-height: 206px;
    padding: 22px;
  }

  .offer-card-body h3 {
    font-size: 28px;
  }

  .case-shelf .market-section-heading {
    grid-template-columns: 1fr auto;
  }

  .case-shelf-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .case-featured img {
    min-height: 0;
    aspect-ratio: 1.3 / 1;
  }

  .case-index a {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 15px;
    min-height: 112px;
    padding: 0;
  }

  .case-index img {
    width: 112px;
    aspect-ratio: 1 / 1;
    border-radius: 0;
  }

  .case-index div {
    padding: 16px 16px 16px 0;
  }

  .case-index h3 {
    font-size: 21px;
  }

  .trust-strip {
    grid-template-columns: 1fr;
    gap: 42px;
    margin-top: 82px;
    padding: 54px 0;
  }

  .trust-lead strong {
    font-size: clamp(42px, 12vw, 58px);
  }

  .market-promo {
    display: grid;
    gap: 30px;
    margin-top: 76px;
    padding: 32px 24px;
  }

  .market-promo h2 {
    font-size: clamp(39px, 11vw, 52px);
  }

  .market-promo .button {
    width: 100%;
  }
}

@media (prefers-color-scheme: dark) and (max-width: 767px) {
  .market-hero::after {
    background: linear-gradient(0deg, rgb(24 37 61 / .86) 0%, rgb(24 37 61 / .72) 45%, rgb(24 37 61 / .22) 78%, transparent 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-hero-video,
  .offer-card-media img,
  .case-shelf img {
    transform: none !important;
  }
}

/* Mobile commerce grid: compact product-like tiles instead of editorial rows. */
@media (max-width: 767px) {
  .offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
  }

  .offer-card,
  .offer-card:hover {
    min-height: 0;
    border-radius: 0;
    box-shadow: 0 8px 22px rgb(36 55 97 / .07);
    transform: none;
  }

  .offer-card-media,
  .offer-card:nth-child(1) .offer-card-media,
  .offer-card:nth-child(2) .offer-card-media,
  .offer-card:nth-child(3) .offer-card-media,
  .offer-card:nth-child(4) .offer-card-media,
  .offer-card:nth-child(5) .offer-card-media,
  .offer-card:nth-child(6) .offer-card-media {
    aspect-ratio: 1 / 1;
  }

  .offer-card-body {
    min-height: 0;
    display: block;
    padding: 11px 11px 13px;
  }

  .offer-card-body p {
    overflow: hidden;
    margin-bottom: 5px;
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .offer-card-body h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    font-size: 18px;
    line-height: 1.08;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .offer-card-body span {
    display: -webkit-box;
    overflow: hidden;
    margin: 7px 0 11px;
    font-size: 12px;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .offer-card-body > a {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    font-size: 12px;
    text-underline-offset: 3px;
  }

  .offer-filters button {
    border-radius: 8px;
  }

  .case-index {
    display: contents;
  }

  .case-shelf-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .case-featured,
  .case-index article {
    border-radius: 0;
    border: 1px solid var(--line);
    overflow: hidden;
  }

  .case-featured a,
  .case-index a {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .case-featured img,
  .case-index img {
    width: 100%;
    height: clamp(150px, 30vw, 190px);
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
  }

  .case-featured div,
  .case-index div {
    padding: 11px 11px 13px;
  }

  .case-featured p,
  .case-index p {
    overflow: hidden;
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .case-featured h3,
  .case-index h3 {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 5px;
    font-size: 18px;
    line-height: 1.08;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}
.market-hero-video{z-index:-1}

/* Keep content cards square at every responsive breakpoint. */
.offer-card,
.case-featured,
.case-featured img,
.case-index article {
  border-radius: 0;
}
