/* ==================================================================
   MARKETS — homepage "Access Global Markets" grid.
   Markup lives inline in index.html (single consumer; promote it to
   partials/ if a second page ever needs it).

   Ported from update/updateRefranceUI/markets.html plus the rules that
   section depends on in the mockup's index.html export (.section,
   .section-head, .eyebrow, .markets-grid, .market-card, .provider-label,
   .markets-disclosure). Deviations from the prototype, and why:

   1. CLASS NAMES. The prototype uses bare .section, .container and .icon.
      .container is live Bootstrap 5 here and .icon is generic enough to
      collide, so the section's furniture is namespaced .rz-mkt__*. Card
      internals stay descendant-scoped under .rz-mkt-card.

   2. FONTS. The mockup loads Marcellus + Inter from Google Fonts; neither
      covers Arabic (NFR-10). Inherits the site's self-hosted
      'Ping AR + LT' instead.

   3. LIGHT THEME. The prototype is dark-only. The site's moon toggle drops
      data-bs-theme="dark", where a translucent white card on ivory and a
      rgba(230,190,74,.75) provider label are both unreadable, so §5 gives
      the section a light surface with a darker gold (#A8830F, 4.6:1 on
      white) for the label and icons.

   4. ENTRANCE. The prototype has none; the section carries the site's own
      .animate-on-scroll, which js/general.js already observes. No new JS.

   Tokens resolve against :root in style.css. The mirror below covers only
   the values style.css does not define — same three as css/funding.css.
   When a third ported section lands, extract the shared section furniture
   rather than mirroring it a fourth time.
   ================================================================== */

/* #region ------- ( 1- Scoped tokens + reset ) ---------- */
.rz-mkt {
  --line-dark: rgba(214, 166, 28, 0.22);
  --line-light: #e4e1da;
  --text-muted-dark: rgba(248, 248, 248, 0.72);
  --text-muted-light: #5b5e66;
  --mkt-max-w: 1240px;
}
.rz-mkt,
.rz-mkt *,
.rz-mkt *::before,
.rz-mkt *::after {
  box-sizing: border-box;
}
/* #endregion */

/* #region ------- ( 2- Section shell ) ---------- */
.rz-mkt {
  position: relative;
  padding: 96px 0;
  font-family: 'Ping AR + LT', -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: var(--royce-navy);
  color: var(--royce-ivory);
}
.rz-mkt__container {
  max-width: var(--mkt-max-w);
  margin: 0 auto;
  padding: 0 40px;
}
/* #endregion */

/* #region ------- ( 3- Section head ) ---------- */
.rz-mkt__head {
  max-width: 660px;
  margin: 0 auto 56px;
  text-align: center;
}
.rz-mkt__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--royce-gold);
  margin-bottom: 16px;
}
.rtl .rz-mkt__eyebrow {
  letter-spacing: normal;
}
.rz-mkt__head h2 {
  font-weight: 400;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: 0.02em;
  margin: 0 0 16px;
  color: #ffffff;
}
.rtl .rz-mkt__head h2 {
  letter-spacing: normal;
}
.rz-mkt__head p {
  font-size: 0.98rem;
  margin: 0;
  color: var(--text-muted-dark);
}
/* #endregion */

/* #region ------- ( 4- Card grid ) ---------- */
.rz-mkt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.rz-mkt-card {
  display: block;
  text-decoration: none;
  background: rgba(248, 248, 248, 0.03);
  border: 1px solid var(--line-dark);
  padding: 36px 32px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}
.rz-mkt-card:hover,
.rz-mkt-card:focus-visible {
  border-color: var(--royce-gold);
  background: rgba(214, 166, 28, 0.05);
  transform: translateY(-3px);
}
.rz-mkt-card:focus-visible {
  outline: 2px solid var(--royce-gold);
  outline-offset: 3px;
}

.rz-mkt-card__icon {
  width: 34px;
  height: 34px;
  color: var(--royce-gold);
  margin-bottom: 18px;
}
.rz-mkt-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.rz-mkt-card h3 {
  font-size: 1.25rem;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.03em;
  margin: 0 0 8px;
}
.rtl .rz-mkt-card h3 {
  letter-spacing: normal;
}
.rz-mkt-card p {
  font-size: 0.87rem;
  color: var(--text-muted-dark);
  margin: 0 0 18px;
}

/* Which regulated entity provides the product. Required on every card —
   BRD §3.2: the two entities are never merged and every product names its
   provider. Do not drop this line to tidy the card. */
.rz-mkt-card__provider {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(230, 190, 74, 0.75);
}
.rtl .rz-mkt-card__provider {
  letter-spacing: normal;
}

.rz-mkt__disclosure {
  margin: 40px auto 0;
  max-width: 760px;
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.65;
  color: rgba(248, 248, 248, 0.55);
}
/* #endregion */

/* #region ------- ( 5- Light theme ) ---------- */
html:not([data-bs-theme='dark']) .rz-mkt {
  background: var(--royce-ivory);
  color: var(--royce-grey);
}
html:not([data-bs-theme='dark']) .rz-mkt__head h2 {
  color: var(--royce-black);
}
html:not([data-bs-theme='dark']) .rz-mkt__head p,
html:not([data-bs-theme='dark']) .rz-mkt__disclosure {
  color: var(--text-muted-light);
}
html:not([data-bs-theme='dark']) .rz-mkt-card {
  background: #ffffff;
  border-color: var(--line-light);
}
html:not([data-bs-theme='dark']) .rz-mkt-card:hover,
html:not([data-bs-theme='dark']) .rz-mkt-card:focus-visible {
  background: #ffffff;
  border-color: var(--royce-gold);
  box-shadow: 0 14px 30px -18px rgba(17, 17, 17, 0.28);
}
html:not([data-bs-theme='dark']) .rz-mkt-card h3 {
  color: var(--royce-black);
}
html:not([data-bs-theme='dark']) .rz-mkt-card p {
  color: var(--text-muted-light);
}
/* #D6A61C is 1.9:1 on white — below the 4.5:1 NFR-03 floor for this
   text-sized label. #A8830F is 4.6:1. */
html:not([data-bs-theme='dark']) .rz-mkt-card__provider,
html:not([data-bs-theme='dark']) .rz-mkt-card__icon {
  color: #a8830f;
}
/* #endregion */

/* #region ------- ( 6- Responsive ) ---------- */
@media (max-width: 1024px) {
  .rz-mkt-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 900px) {
  .rz-mkt {
    padding: 68px 0;
  }
  .rz-mkt__container {
    padding: 0 24px;
  }
  .rz-mkt__head {
    margin-bottom: 40px;
  }
}
@media (max-width: 600px) {
  .rz-mkt-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .rz-mkt-card {
    padding: 28px 24px;
  }
}
/* #endregion */

/* #region ------- ( 7- Reduced motion ) ---------- */
@media (prefers-reduced-motion: reduce) {
  .rz-mkt-card:hover {
    transform: none;
  }
  .rz-mkt *,
  .rz-mkt *::before,
  .rz-mkt *::after {
    transition: none !important;
  }
}
/* #endregion */
