/*
  Components brought over from staging's theme (sectionIntro, stats, weekClock, iconCards, flowSteps), styled to fit
  prod's original MintedBox design: Lato, bold headings, purple and yellow. Every rule is scoped to .gx (the class those
  components' sections carry), so nothing else on prod changes.
*/
.gx {
  --purple: #502261; --yellow: #ffdd00; --dark: #29262b; --grey-dark: #6c656f; --grey-light-1: #f8f8f8;
  --grey-light-3: #d9d9d9; --white: #fff; --line-light: #ededed; --line-dark: rgba(255, 255, 255, 0.14);
  --muted-dark: rgba(255, 255, 255, 0.72); --gutter: 24px;
  position: relative; font-family: "Lato", sans-serif; color: var(--dark);
}
.gx *, .gx *::before, .gx *::after { box-sizing: border-box; }
.gx .wrap { max-width: calc(1180px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.gx.bg-none { background: transparent; }
.gx.bg-grey-light-1 { background: var(--grey-light-1); }
.gx.bg-purple { background: var(--purple); color: var(--white); }
.gx.bg-dark { background: var(--dark); color: var(--white); }
.gx.sec-pt-l { padding-top: 64px; } .gx.sec-pt-s { padding-top: 32px; } .gx.sec-pt-0 { padding-top: 0; }
.gx.sec-pb-l { padding-bottom: 64px; } .gx.sec-pb-s { padding-bottom: 32px; } .gx.sec-pb-0 { padding-bottom: 0; }
.gx h2, .gx h3 { font-family: "Lato", sans-serif; font-weight: 700; letter-spacing: 0; color: var(--dark); }
.gx h2 { font-size: 32px; line-height: 1.25; margin: 0 0 16px; }
.gx h3 { font-size: 28px; line-height: 1.3; margin: 0 0 16px; }
.gx p, .gx li { font-size: 16px; line-height: 24px; color: var(--grey-dark); }
.gx p { margin: 0 0 16px; }
.gx a { color: var(--purple); }
.gx.bg-purple :is(h2, h3), .gx.bg-dark :is(h2, h3) { color: var(--white); }
.gx.bg-purple p, .gx.bg-dark p { color: var(--muted-dark); }
.gx .admin-note { font-size: 13px; border: 1px dashed #bbb; padding: 10px 12px; margin: 0 0 16px; }

/* Scroll reveal: gx.js adds gx-reveal to the page (visitors only, motion allowed). */
.gx-reveal .gx .reveal { transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--rd, 0ms); }
.gx-reveal .gx .reveal:not(.in) { opacity: 0; transform: translateY(28px); }

/* Section intro: small label left, heading and text right. */
.gx .split-head { display: grid; grid-template-columns: 240px 1fr; gap: 40px; }
.gx .label { font: 700 14px/1.4 "Lato", sans-serif; text-transform: uppercase; letter-spacing: 0.06em; color: var(--purple); padding-top: 10px; border-top: 3px solid var(--yellow); margin: 0; }
.gx .split-head-text p { max-width: 46em; }
.gx.bg-purple .label, .gx.bg-dark .label { color: var(--yellow); }

/* Numbers */
.gx .stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.gx .stat { padding: 8px 24px 8px 0; }
.gx .stat + .stat { padding-left: 24px; border-left: 1px solid var(--line-dark); }
.gx .stat .multiField_0 { font: 700 48px/1.1 "Lato", sans-serif; color: var(--yellow); }
.gx .stat .multiField_1 { margin-top: 10px; font-size: 16px; line-height: 24px; color: var(--muted-dark); max-width: 16em; }
.gx.bg-none .stat .multiField_0, .gx.bg-grey-light-1 .stat .multiField_0 { color: var(--purple); }
.gx.bg-none .stat .multiField_1, .gx.bg-grey-light-1 .stat .multiField_1 { color: var(--grey-dark); }
.gx.bg-none .stat + .stat, .gx.bg-grey-light-1 .stat + .stat { border-left-color: var(--line-light); }

/* Trading week clock (prod only uses the classic layout's look) */
.gx .wk-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; row-gap: 0; align-items: start; max-width: calc(920px + 2 * var(--gutter)); }
#page_slide:not(.admin) .gx .wk-text { display: contents; }
.gx .wk-text :is(h2, h3) { grid-column: 1 / -1; text-align: center; margin-bottom: 48px; }
.gx .wk-text p { grid-column: 1; }
.gx .wk { --t: 78%; grid-column: 2; grid-row: 2 / span 8; position: relative; background: var(--purple); color: var(--white); padding: 26px; font: 13px/1.4 "Lato", sans-serif; box-shadow: 0 30px 60px -30px rgba(80, 34, 97, 0.6); }
.gx .wk-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; }
.gx .wk-clock { font: 700 36px/1 "Lato", sans-serif; font-variant-numeric: tabular-nums; }
.gx .wk-zone, .gx .wk-days { color: rgba(255, 255, 255, 0.75); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.gx .wk-days { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 18px; }
.gx .wk-days span { padding: 0 0 6px 6px; border-left: 1px solid var(--line-dark); }
.gx .wk-track { margin-bottom: 22px; }
.gx .wk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.gx .wk-row span { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.gx .wk-state { font: 700 11px/1 "Lato", sans-serif; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 9px; border: 1px solid var(--line-dark); color: var(--muted-dark); transition: 0.25s; }
.gx .wk-state.on { background: var(--yellow); border-color: var(--yellow); color: var(--dark); }
.gx .wk-bar { position: relative; height: 16px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 calc(100% / 7 - 1px), rgba(255, 255, 255, 0.25) calc(100% / 7 - 1px) calc(100% / 7)); }
.gx .wk-bar i { position: absolute; top: 0; bottom: 0; background: var(--white); transform-origin: left; transition: transform 0.9s cubic-bezier(.2, .8, .2, 1) calc(0.3s + var(--d, 0) * 0.12s); }
.gx .wk-perps .wk-bar i { background: linear-gradient(90deg, var(--yellow), #fff1a0 50%, var(--yellow)); background-size: 200% 100%; animation: gx-shimmer 3s linear infinite; transition-duration: 1.6s; transition-delay: 0.9s; }
@keyframes gx-shimmer { to { background-position: -200% 0; } }
.gx-reveal .gx .wk:not(.in) .wk-bar i { transform: scaleX(0); }
.gx .wk-bar::after { content: ""; position: absolute; top: -7px; bottom: -7px; left: var(--t); width: 2px; margin-left: -1px; background: var(--white); box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.55); }
.gx .wk-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line-dark); padding-top: 18px; }
.gx .wk-foot b { display: block; font: 700 40px/1 "Lato", sans-serif; font-variant-numeric: tabular-nums; }
.gx .wk-foot div + div b { color: var(--yellow); }
.gx .wk-foot small { display: block; margin-top: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* Icon cards */
.gx .icards { display: grid; gap: 24px; }
.gx .icards-2 { grid-template-columns: repeat(2, 1fr); }
.gx .icards-3 { grid-template-columns: repeat(3, 1fr); }
.gx .icards-4 { grid-template-columns: repeat(4, 1fr); }
.gx .icard { position: relative; background: var(--white); border-radius: 8px; padding: 28px 24px 22px; overflow: hidden; box-shadow: 0 4px 24px rgba(41, 38, 43, 0.08); transition: transform 0.25s, box-shadow 0.25s; }
.gx .icard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease; }
.gx .icard:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(80, 34, 97, 0.18); }
.gx .icard:hover::before { transform: none; }
.gx .icard .multiField_0 { display: none; }
#page_slide.admin .gx .icard .multiField_0 { display: block; font-size: 13px; color: var(--grey-dark); }
#page_slide.admin .gx .icard .multiField_0::before { content: "Icon: "; }
.gx .icard-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 8px; background: var(--purple); color: var(--white); transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), background 0.25s; }
.gx .icard-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gx .icard:hover .icard-icon { transform: rotate(-6deg) scale(1.08); background: var(--dark); color: var(--yellow); }
.gx .icard .multiField_1 { font: 700 20px/1.3 "Lato", sans-serif; color: var(--dark); margin-bottom: 10px; }
.gx .icard .multiField_2 p:last-child { margin-bottom: 0; }
.gx .icard .multiField_2 ul { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--line-light); }
.gx .icard .multiField_2 li { padding: 10px 0 10px 24px; border-bottom: 1px solid var(--line-light); position: relative; }
.gx .icard .multiField_2 li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 10px; height: 10px; border-radius: 2px; background: var(--yellow); }
.gx.bg-grey-light-1 .icard { background: var(--white); }

/* Flow steps */
.gx .fsteps { --n: 4; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 32px; counter-reset: fstep; }
.gx .fsteps:has(> .fstep:nth-of-type(2):last-of-type) { --n: 2; }
.gx .fsteps:has(> .fstep:nth-of-type(3):last-of-type) { --n: 3; }
.gx .fsteps:has(> .fstep:nth-of-type(5):last-of-type) { --n: 5; }
.gx .fsteps-line { position: absolute; left: 28px; right: calc((100% - (var(--n) - 1) * 32px) / var(--n) - 28px); top: 27px; height: 2px; background: var(--grey-light-3); overflow: hidden; }
.gx .fsteps-line::before { content: ""; position: absolute; inset: 0; background: var(--purple); transform-origin: left; transition: transform 1.4s cubic-bezier(.4, 0, .2, 1) 0.2s; }
.gx .fsteps-line::after { content: ""; position: absolute; top: -3px; left: -60px; width: 60px; height: 8px; background: linear-gradient(90deg, transparent, var(--yellow)); animation: gx-travel 2.6s linear infinite 1.6s; }
@keyframes gx-travel { to { left: 100%; } }
.gx-reveal .gx .fsteps:not(.in) .fsteps-line::before { transform: scaleX(0); }
.gx .fstep { position: relative; counter-increment: fstep; transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2, .8, .2, 1); }
.gx .fstep:nth-of-type(2) { transition-delay: 0.3s; } .gx .fstep:nth-of-type(3) { transition-delay: 0.6s; }
.gx .fstep:nth-of-type(4) { transition-delay: 0.9s; } .gx .fstep:nth-of-type(5) { transition-delay: 1.2s; }
.gx-reveal .gx .fsteps:not(.in) .fstep { opacity: 0; transform: translateY(20px); }
.gx .fstep::before { content: counter(fstep, decimal-leading-zero); position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 22px; border-radius: 50%; background: var(--purple); color: var(--white); font: 700 17px "Lato", sans-serif; transition: background 0.25s, color 0.25s, transform 0.25s; }
.gx .fstep:hover::before { background: var(--yellow); color: var(--dark); transform: scale(1.08); }
.gx .fstep .multiField_0 { font: 700 20px/1.3 "Lato", sans-serif; color: var(--dark); margin-bottom: 10px; }

@media (max-width: 1080px) {
  .gx .split-head { grid-template-columns: 1fr; gap: 16px; }
  .gx .label { max-width: 240px; }
  .gx .stats { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .gx .stat:nth-of-type(3) { padding-left: 0; border-left: 0; }
  .gx .icards-3, .gx .icards-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .gx .fsteps { grid-auto-flow: row; gap: 28px; }
  .gx .fsteps-line { display: none; }
  .gx .fstep { padding-left: 80px; min-height: 56px; }
  .gx .fstep::before { position: absolute; left: 0; top: 0; margin: 0; }
  .gx .fstep:not(:last-of-type)::after { content: ""; position: absolute; left: 27px; top: 56px; bottom: -28px; width: 2px; background: var(--purple); transform-origin: top; transition: transform 0.5s ease 0.4s; }
  .gx-reveal .gx .fsteps:not(.in) .fstep::after { transform: scaleY(0); }
}
@media (max-width: 860px) {
  .gx .wk-grid { grid-template-columns: 1fr; }
  .gx .wk { grid-column: 1; grid-row: auto; margin-top: 16px; }
}
@media (max-width: 720px) {
  .gx.sec-pt-l { padding-top: 40px; } .gx.sec-pb-l { padding-bottom: 40px; }
  .gx .stats, .gx .icards-2, .gx .icards-3, .gx .icards-4 { grid-template-columns: 1fr; }
  .gx .stat, .gx .stat + .stat { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line-dark); }
  .gx .stat:first-of-type { border-top: 0; padding-top: 0; }
  .gx .wk-days span { padding-left: 3px; font-size: 10px; letter-spacing: 0.02em; }
  .gx h2 { font-size: 26px; } .gx h3 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .gx *, .gx *::before, .gx *::after { animation: none !important; transition: none !important; }
}
