/* Cross-page UX refinements layered over Kemia's canonical visual system. */

html {
  scroll-padding-top: 7rem;
}

.site-header {
  position: sticky;
  top: 0;
}

:target {
  scroll-margin-top: 7rem;
}

:where(a, button, summary) {
  touch-action: manipulation;
}

:where(.desktop-nav, .mobile-menu, .site-footer) a[aria-current='page'] {
  color: #fff;
}

:where(.desktop-nav, .mobile-menu) a[aria-current='page'] {
  background: rgb(255 255 255 / 9%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%);
}

:where(.legal-document, .support-page, .site-footer) a[href^='mailto:'] {
  overflow-wrap: anywhere;
}

.storefront-section {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(520px, 1.28fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
}

.storefront-intro h2 {
  max-width: 680px;
  margin: 0 0 26px;
  font-size: clamp(44px, 5vw, 76px);
}

.storefront-intro .section-lede {
  max-width: 620px;
  margin-bottom: 22px;
}

.storefront-note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: var(--type-label-weight);
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.storefront-note::before {
  content: '';
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgb(255 200 87 / 16%);
}

.storefront-grid {
  display: grid;
  gap: 16px;
}

.storefront-card {
  min-height: 230px;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 8%, rgb(155 123 255 / 15%), transparent 14rem),
    linear-gradient(145deg, rgb(255 255 255 / 7%), transparent),
    var(--panel);
  color: var(--ink);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.storefront-card[data-storefront='google'] {
  background:
    radial-gradient(circle at 88% 8%, rgb(79 209 197 / 14%), transparent 14rem),
    linear-gradient(145deg, rgb(255 255 255 / 7%), transparent),
    var(--panel);
}

.storefront-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(34px, 5vw, 54px);
}

.storefront-platform,
.storefront-status,
.storefront-action {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: var(--type-label-weight);
  letter-spacing: var(--type-label-letter-spacing);
  line-height: var(--type-label-line-height);
  text-transform: uppercase;
}

.storefront-platform {
  color: var(--ink-dim);
}

.storefront-status {
  padding: 7px 10px;
  border: 1px solid rgb(255 200 87 / 34%);
  border-radius: 999px;
  background: rgb(255 200 87 / 10%);
  color: var(--gold);
  letter-spacing: 0.1em;
}

.storefront-card h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.storefront-card p {
  max-width: 520px;
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.storefront-action {
  color: var(--ink-dim);
  letter-spacing: 0.1em;
}

a.storefront-card {
  display: block;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

a.storefront-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

a.storefront-card:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

.storefront-card.is-available .storefront-status {
  border-color: rgb(79 209 197 / 38%);
  background: rgb(79 209 197 / 10%);
  color: var(--teal);
}

.storefront-card.is-available .storefront-action {
  color: var(--ink);
}

@media (hover: none) {
  .button:hover {
    transform: none;
  }

  a.storefront-card:hover {
    transform: none;
  }
}

@media (max-width: 1180px) {
  .mobile-menu summary,
  .mobile-menu > a:not(.button),
  .mobile-menu details a {
    font-size: 14px;
    line-height: 1.35;
  }

  .storefront-section {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .storefront-section {
    gap: 40px;
  }

  .storefront-grid {
    grid-template-columns: 1fr;
  }

  .storefront-card {
    min-height: 210px;
    border-radius: var(--radius-md);
  }

  .storefront-card-topline {
    align-items: flex-start;
  }
}

@media (prefers-contrast: more) {
  :focus-visible {
    outline-width: 4px;
  }

  :where(.desktop-nav, .mobile-menu) a[aria-current='page'] {
    box-shadow: inset 0 0 0 2px currentColor;
  }
}
