/* Home only. The first cascade layer can override the older storefront themes. */
@font-face {
  font-family: "Market Inter";
  src: url("../fonts/inter/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@layer shop-front-page {
  body:has(.home-page) {
    --shop-paper: #f6f7f8;
    --shop-ink: #18232e;
    --shop-secondary: #526170;
    --shop-rule: #dce1e5;
    --shop-action: #245bcb;
    background: var(--shop-paper) !important;
  }

  .home-page {
    --store-font: "Market Inter", system-ui, sans-serif;
    --store-bold: 650;
    --store-medium: 560;
    --store-regular: 430;
    font-family: var(--store-font) !important;
    font-weight: var(--store-regular) !important;
    font-optical-sizing: auto;
    color: var(--shop-ink) !important;
    background: var(--shop-paper) !important;
  }

  #sfStorefrontBanners:has(.shop-hero),
  #sfStorefrontBanners .home-banner-track:has(.shop-hero),
  #sfStorefrontBanners .home-banner-slide:has(.shop-hero) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    padding: 0 !important;
    background: #142026 !important;
  }

  #sfStorefrontBanners:has(.shop-hero) {
    overflow: hidden;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: none !important;
  }

  .shop-hero {
    isolation: isolate;
    position: relative;
    display: grid;
    align-items: center;
    width: 100%;
    min-height: clamp(300px, 29vw, 398px);
    overflow: hidden;
    color: #fff;
  }

  .shop-hero-art, .shop-hero-art img, .shop-hero::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
  }

  .shop-hero-art { z-index: -2; }
  .shop-hero-art img { display: block; object-fit: cover; object-position: 64% 50%; }
  .shop-hero::after {
    content: "";
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(90deg, rgb(10 20 24 / 88%) 0%, rgb(10 20 24 / 76%) 35%, rgb(10 20 24 / 24%) 62%, transparent 78%);
  }

  .shop-hero-copy {
    box-sizing: content-box;
    width: 51%;
    max-width: 630px;
    padding: clamp(26px, 3.5vw, 52px) clamp(28px, 4vw, 62px);
  }
  .shop-hero h2 {
    margin: 0 !important;
    max-width: 29ch;
    color: #fff !important;
    font: 590 clamp(26px, 3.1vw, 46px)/1.08 var(--store-font) !important;
    letter-spacing: -.039em !important;
    text-wrap: balance;
  }
  .shop-hero p {
    margin: 15px 0 0 !important;
    max-width: 53ch;
    color: #e2e8e9 !important;
    font: 430 clamp(14px, 1.2vw, 17px)/1.52 var(--store-font) !important;
  }
  .shop-hero-mobile-title, .shop-hero-mobile-subtitle { display: none; }
  .shop-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
  }
  .shop-hero-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    font: 580 14px/1.3 var(--store-font) !important;
    text-decoration: none !important;
    white-space: nowrap;
  }
  .shop-hero-primary { background: #f7f9fc !important; color: #162831 !important; }
  .shop-hero-secondary {
    background: var(--shop-action) !important;
    color: #fff !important;
  }
  .shop-hero-actions svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
    stroke-linecap: round;
    width: 16px;
    height: 16px;
  }
  .shop-hero-primary svg { margin-inline-start: 10px; }
  .shop-hero-secondary svg { margin-inline-end: 8px; }
  .shop-hero-telegram-prefix { margin-inline-end: .28em; }
  .shop-hero-actions a:focus-visible { outline: 2px solid #b9d5fc; outline-offset: 3px; }

  .home-page .home-store-group,
  .home-page .home-showcase,
  .home-page .sf-home-reviews {
    box-shadow: none !important;
    border: 0 !important;
    background: transparent !important;
    padding-inline: 0 !important;
  }
  .home-page :is(.home-section-head, .sf-section-head, .steam-widget-heading) > :is(h1,h2) {
    color: var(--shop-ink) !important;
    font: 630 clamp(20px, 2.05vw, 29px)/1.2 var(--store-font) !important;
    letter-spacing: -.033em !important;
  }
  .home-page :is(.home-section-head, .sf-section-head) > a {
    color: var(--shop-action) !important;
    font: 550 14px/1.45 var(--store-font) !important;
  }

  .home-page :is(.ct-root, .product-card, .steam-widget, .sf-review) {
    background: #fff !important;
    border: 1px solid var(--shop-rule) !important;
    box-shadow: none !important;
    border-radius: 12px !important;
  }
  .home-page .ct-root-copy strong {
    color: var(--shop-ink) !important;
    font: 625 15px/1.3 var(--store-font) !important;
    letter-spacing: .008em !important;
  }
  .home-page :is(.ct-root-copy small, .sf-review-product-category) {
    color: var(--shop-secondary) !important;
    font: 440 13px/1.42 var(--store-font) !important;
  }
  .home-page .ct-root-arrow { display: none !important; }
  .home-page .home-store-group { padding-block-start: 0 !important; }
  .home-page :is(.product-name, .rust-license-card-title, .sf-review-author) {
    color: var(--shop-ink) !important;
    font: 600 15px/1.38 var(--store-font) !important;
    letter-spacing: -.012em !important;
  }
  .home-page :is(.product-price, .rust-license-price, .steam-widget-total strong) {
    color: var(--shop-ink) !important;
    font-weight: 650 !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.025em !important;
  }
  .home-page :is(.steam-widget-head, .sf-review-purchase, .product-footer) {
    border-color: var(--shop-rule) !important;
  }
  .home-page .steam-widget-summary {
    background: #f5f7f8 !important;
    border-color: var(--shop-rule) !important;
  }
  .home-page .sf-review-text {
    color: var(--shop-ink) !important;
    font: 440 15px/1.55 var(--store-font) !important;
  }
  @media (hover: hover) {
    .shop-hero-primary:hover { background: #dfeaff !important; }
    .shop-hero-secondary:hover { background: #1c4daa !important; }
    .home-page :is(.ct-root, .product-card):hover { border-color: #aabac8 !important; }
  }
  @media (min-width: 901px) {
    .shop-hero { min-height: clamp(250px, 23vw, 324px); }
    .shop-hero-art img {
      inset-inline-start: auto;
      width: auto;
      max-width: 100%;
      object-fit: contain;
      object-position: right center;
      mask-image: linear-gradient(to right, transparent, #000 24%);
    }
    .shop-hero-copy { width: 54%; max-width: 650px; padding-block: clamp(16px, 1.65vw, 24px); }
    .shop-hero h2 { font-size: clamp(26px, 2.85vw, 41px) !important; }
    .shop-hero p { margin-top: 10px !important; }
    .shop-hero-actions { margin-top: 17px; }
  }
  @media (max-width: 900px) {
    .shop-hero-telegram-prefix { display: none !important; }
  }
  @media (min-width: 661px) and (max-width: 900px) {
    .shop-hero-copy { width: 57%; padding-inline: 26px; }
    .shop-hero-actions { flex-wrap: nowrap; }
    .shop-hero-actions a { padding-inline: 10px !important; }
  }
  @media (max-width: 660px) {
    #sfStorefrontBanners:has(.shop-hero) { border-radius: 13px !important; }
    .shop-hero {
      align-items: end;
      min-height: 0;
      background: #172123;
    }
    .shop-hero-art img { object-position: calc(100% + clamp(0px, 108px - 30vw, 12px)) top; }
    .shop-hero::after {
      background: linear-gradient(0deg, rgb(9 17 19 / 86%), rgb(9 17 19 / 66%) 43%, transparent 77%);
    }
    .shop-hero-copy {
      box-sizing: border-box;
      width: 100%;
      max-width: none;
      padding: clamp(76px, 24vw, 158px) clamp(14px, 4vw, 20px) 12px;
    }
    .shop-hero h2 {
      font: 700 clamp(27px, 7.3vw, 34px)/1.05 var(--store-font) !important;
      letter-spacing: -.045em !important;
    }
    .shop-hero-full-title, .shop-hero-full-subtitle { display: none !important; }
    .shop-hero-mobile-title, .shop-hero-mobile-subtitle { display: inline !important; }
    .shop-hero p {
      max-width: 43ch;
      margin: 5px 0 0 !important;
      color: #edf1ef !important;
      font-size: 13px !important;
      line-height: 1.4 !important;
    }
    .shop-hero-actions {
      display: grid;
      grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
      gap: 6px;
      margin: 10px 0 0;
    }
    .shop-hero-actions a {
      box-sizing: border-box;
      min-width: 0;
      padding: 8px 5px;
      font-size: clamp(13px, 3.5vw, 14px) !important;
    }
    .home-page :is(.home-section-head,.sf-section-head) > a { font-size: 13px !important; }
    .home-page .ct-root-copy small { font-size: 12px !important; }
  }
}
