/* =====================================================================================================================
   Home v2 sections (x-sec, marquee, steps, bento, connect, integrations, developers, cases, languages, trust, posts).
   Uses the template tokens re-coloured in site-v2.css. Dark mode = `.dark`. Logical properties only (RTL-safe).
   ===================================================================================================================== */
:root { --x-card: #fff; --x-card-2: #f5f8fa; --x-line: #dfe5ec; --x-text: #0b1220; --x-dim: #5b6779; }
.dark { --x-card: #141c2b; --x-card-2: #101827; --x-line: rgb(255 255 255 / .1); --x-text: #f1f5fb; --x-dim: #9aa7bb; }

.x-sec { padding: 84px 0; }
.x-sec.alt { background: var(--color-background-2, #f5f7fa); }
.dark .x-sec.alt { background: var(--color-background-7, #171d28); }
.x-sec-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.x-sec-head.start { text-align: start; margin-inline: 0; }
.x-sec-head h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.2; font-weight: 500; letter-spacing: -.015em; }
html[lang="ar"] .x-sec-head h2, html[lang="ur"] .x-sec-head h2 { line-height: 1.4; letter-spacing: 0; }
.x-sec-head p { margin: 0; color: var(--x-dim); }
.x-center { display: flex; justify-content: center; margin-top: 36px; }
.x-fine { font-size: 12px; color: var(--x-dim); text-align: center; margin-top: 14px; }
.x-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--color-primary-600); margin-top: 10px; }
.dark .x-more { color: var(--mint); }
.x-more svg { transition: transform .2s; }
[dir="rtl"] .x-more svg { transform: scaleX(-1); }
a:hover > .x-more svg, .x-more:hover svg { transform: translateX(3px); }
[dir="rtl"] a:hover > .x-more svg, [dir="rtl"] .x-more:hover svg { transform: scaleX(-1) translateX(3px); }

/* ---- marquee ---------------------------------------------------------------------------------------------- */
.x-marquee-sec { padding: 34px 0 18px; border-block: 1px solid var(--x-line); background: var(--x-card-2); overflow: hidden; }
.x-marquee-cap { text-align: center; font-size: 13px; letter-spacing: .02em; color: var(--x-dim); margin: 0 0 18px; }
.x-marquee { overflow: hidden; direction: ltr; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); margin-bottom: 12px; }
.x-marquee-track { display: flex; width: max-content; gap: 14px; animation: x-slide 60s linear infinite; padding-inline: 7px; }
.x-marquee.rev .x-marquee-track { animation-direction: reverse; animation-duration: 75s; }
.x-marquee:hover .x-marquee-track { animation-play-state: paused; }
@keyframes x-slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .x-marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } .x-marquee { -webkit-mask-image: none; mask-image: none; } }
.x-logo-item { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px; border: 1px solid var(--x-line); border-radius: 14px; background: var(--x-card); color: var(--x-dim); white-space: nowrap; transition: color .2s, border-color .2s, transform .2s; }
.x-logo-item:hover { color: var(--x-text); border-color: var(--color-primary-400); transform: translateY(-1px); }
.x-logo { display: inline-block; width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; transition: background .2s; }
.x-logo-item:hover .x-logo { background: var(--c, currentColor); }
.x-logo-name { font-size: 14px; font-weight: 500; }

/* ---- steps ------------------------------------------------------------------------------------------------ */
.x-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 20px; counter-reset: s; position: relative; }
.x-steps::before { content: ""; position: absolute; inset-inline: 12%; top: 29px; height: 2px; background: repeating-linear-gradient(90deg, var(--x-line) 0 8px, transparent 8px 16px); }
.x-step { position: relative; text-align: center; padding: 0 6px; }
.x-step-n { position: absolute; inset-block-start: -6px; inset-inline-start: calc(50% + 14px); width: 22px; height: 22px; border-radius: 50%; background: var(--color-primary-500); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; z-index: 2; }
.x-step-ic { width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--x-card); border: 1px solid var(--x-line); color: var(--color-primary-600); box-shadow: 0 10px 24px -12px rgb(11 18 32 / .25); position: relative; z-index: 1; }
.dark .x-step-ic { color: var(--mint); }
.x-step h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; }
.x-step p { margin: 0; font-size: .92rem; color: var(--x-dim); }

/* ---- bento ------------------------------------------------------------------------------------------------ */
.x-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.x-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 18px; padding: 26px; border-radius: 24px; background: var(--x-card); border: 1px solid var(--x-line); transition: transform .25s, box-shadow .25s, border-color .25s; }
.x-tile:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -28px rgb(11 18 32 / .35); border-color: rgb(52 227 190 / .5); }
.x-tile.b-wide { grid-column: span 2; }
.x-tile-ic { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--mint-soft); color: var(--color-primary-600); margin-bottom: 12px; }
.dark .x-tile-ic { color: var(--mint); }
.x-tile h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 6px; }
.x-tile p { margin: 0; color: var(--x-dim); font-size: .95rem; }
.x-tile-vis { margin-top: auto; border-radius: 16px; overflow: hidden; background: var(--x-card-2); border: 1px solid var(--x-line); max-height: 240px; pointer-events: none; }
.x-tile.b-wide .x-tile-vis { max-height: 270px; }
.x-mini-cost { padding: 18px; display: grid; gap: 12px; font-size: 13px; }
.x-mini-cost small { color: var(--x-dim); display: block; }
.x-mini-cost b { font-size: 1.35rem; font-weight: 600; }
.x-mini-bar { height: 10px; border-radius: 99px; background: var(--x-line); overflow: hidden; }
.x-mini-bar i { display: block; height: 100%; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, #078a70, #34e3be); }
.x-mini-row { display: flex; justify-content: space-between; gap: 8px; color: var(--x-dim); font-size: 12px; }
.x-mini-win { display: flex; gap: 8px; padding: 18px; flex-wrap: wrap; }
.x-mini-win span { padding: 8px 12px; border-radius: 99px; background: var(--x-line); font-size: 12.5px; color: var(--x-dim); }
.x-mini-win span.on { background: var(--mint-soft); color: var(--color-primary-600); }
.dark .x-mini-win span.on { color: var(--mint); }
.x-mini-flags { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px; }
.x-mini-flags img { border-radius: 4px; box-shadow: 0 0 0 1px var(--x-line); }

/* ---- connect tabs ----------------------------------------------------------------------------------------- */
.x-tablist { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.x-tablist [role="tab"] { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--x-line); background: var(--x-card); color: var(--x-dim); font-weight: 500; cursor: pointer; transition: all .2s; }
.x-tablist [role="tab"]:hover { color: var(--x-text); }
.x-tablist [role="tab"][aria-selected="true"] { background: var(--color-secondary); color: #fff; border-color: transparent; }
.dark .x-tablist [role="tab"][aria-selected="true"] { background: var(--mint); color: #08121f; }
.x-connect-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 34px; border-radius: 28px; background: var(--x-card); border: 1px solid var(--x-line); }
.x-connect-panel[hidden] { display: none; }
.x-connect-panel h3 { font-size: 1.4rem; font-weight: 500; margin: 0 0 22px; line-height: 1.3; }
.x-olist { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.x-olist li { display: flex; gap: 14px; }
.x-olist li > span { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--mint-soft); color: var(--color-primary-600); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.dark .x-olist li > span { color: var(--mint); }
.x-olist b { font-weight: 600; display: block; }
.x-olist p { margin: 2px 0 0; color: var(--x-dim); font-size: .93rem; }
.x-connect-vis { border-radius: 20px; background: linear-gradient(180deg, #0f1a2e, #0a1120); color: #e9eff9; padding: 22px; min-height: 240px; display: flex; align-items: center; }
.x-term { margin: 0; width: 100%; font: 12.5px/1.65 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; color: #cfe3ff; }
.x-checklist { width: 100%; display: grid; gap: 10px; }
.x-chk { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .08); font-size: 14px; color: #93a1b8; }
.x-chk span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .08); }
.x-chk.ok { color: #e9eff9; }
.x-chk.ok span { background: rgb(52 227 190 / .2); color: #34e3be; }
.x-chk.wait { color: #e9eff9; border-color: rgb(52 227 190 / .4); }
.x-chk.wait span { background: rgb(250 204 21 / .18); color: #facc15; }
.x-checklist small { color: #93a1b8; font-size: 11.5px; }

/* ---- integrations ----------------------------------------------------------------------------------------- */
.x-int-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.x-int-col { padding: 22px; border-radius: 22px; background: var(--x-card); border: 1px solid var(--x-line); }
.x-int-col h3 { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--x-dim); margin: 0 0 14px; }
html[lang="ar"] .x-int-col h3, html[lang="ur"] .x-int-col h3 { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.x-int-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.x-int-col .x-logo-item { width: 100%; height: 46px; border-radius: 12px; background: var(--x-card-2); }

/* ---- developers ------------------------------------------------------------------------------------------- */
.x-dev { display: grid; grid-template-columns: 1.25fr .75fr; gap: 24px; align-items: start; }
.x-code { border-radius: 22px; background: linear-gradient(180deg, #0f1a2e, #0a1120); color: #cfe3ff; border: 1px solid rgb(255 255 255 / .08); overflow: hidden; box-shadow: 0 40px 80px -40px rgb(8 20 40 / .55); }
.x-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid rgb(255 255 255 / .08); }
.x-code-bar [role="tablist"] { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.x-code-bar [role="tab"] { height: 32px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; color: #93a1b8; font-size: 13px; cursor: pointer; white-space: nowrap; }
.x-code-bar [role="tab"][aria-selected="true"] { background: rgb(52 227 190 / .15); color: #34e3be; }
.x-copy { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid rgb(255 255 255 / .12); background: rgb(255 255 255 / .05); color: #e9eff9; font-size: 12.5px; cursor: pointer; flex: none; }
.x-copy:hover { border-color: #34e3be; }
.x-code pre { margin: 0; padding: 20px; overflow-x: auto; font: 13px/1.7 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 250px; }
.x-code [role="tabpanel"][hidden] { display: none; }
.x-dev-side { display: grid; gap: 16px; }
.x-dev-card { padding: 24px; border-radius: 22px; background: var(--x-card); border: 1px solid var(--x-line); }
.x-dev-card h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 6px; }
.x-dev-card p { margin: 0; color: var(--x-dim); font-size: .93rem; }
.x-ai-logos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.x-ai-logos .x-logo-item { height: 38px; padding: 0 12px; border-radius: 10px; }
.x-ai-logos .x-logo { width: 18px; height: 18px; }
.x-ai-logos .x-logo-name { font-size: 12.5px; }
.x-dev-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.x-dev-links a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--x-card); border: 1px solid var(--x-line); transition: border-color .2s, transform .2s; }
.x-dev-links a:hover { border-color: var(--color-primary-400); transform: translateY(-1px); }
.x-dev-links svg { color: var(--color-primary-600); flex: none; }
.dark .x-dev-links svg { color: var(--mint); }
.x-dev-links b { display: block; font-weight: 600; }
.x-dev-links small { color: var(--x-dim); font-size: 12.5px; }

/* ---- use cases / trust / posts ---------------------------------------------------------------------------- */
.x-cases, .x-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.x-trusts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.x-case, .x-post, .x-trust { display: flex; flex-direction: column; padding: 26px; border-radius: 22px; background: var(--x-card); border: 1px solid var(--x-line); transition: transform .25s, border-color .25s, box-shadow .25s; }
a.x-case:hover, a.x-post:hover { transform: translateY(-3px); border-color: rgb(52 227 190 / .6); box-shadow: 0 24px 50px -30px rgb(11 18 32 / .35); }
.x-case h3, .x-trust h3, .x-post h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 6px; }
.x-case p, .x-trust p, .x-post p { margin: 0; color: var(--x-dim); font-size: .94rem; }
.x-case .x-more, .x-post .x-more { margin-top: auto; padding-top: 12px; }
.x-post-tag { align-self: flex-start; padding: 4px 10px; border-radius: 99px; background: var(--mint-soft); color: var(--color-primary-600); font-size: 12px; margin-bottom: 12px; }
.dark .x-post-tag { color: var(--mint); }

/* ---- languages -------------------------------------------------------------------------------------------- */
.x-langgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.x-lang { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px; border-radius: 18px; background: var(--x-card); border: 1px solid var(--x-line); text-align: center; transition: transform .2s, border-color .2s; }
.x-lang:hover { transform: translateY(-2px); border-color: var(--color-primary-400); }
.x-lang img { border-radius: 4px; box-shadow: 0 0 0 1px var(--x-line); }
.x-lang span { font-weight: 600; }
.x-lang small { color: var(--x-dim); font-size: 12px; }

/* ---- responsive ------------------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .x-int-grid, .x-trusts { grid-template-columns: repeat(2, 1fr); }
  .x-dev { grid-template-columns: 1fr; }
  .x-langgrid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .x-bento, .x-cases, .x-posts { grid-template-columns: repeat(2, 1fr); }
  .x-tile.b-wide { grid-column: span 2; }
  .x-connect-panel { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .x-steps { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); gap: 30px 16px; }
  .x-steps::before { display: none; }
}
@media (max-width: 640px) {
  .x-sec { padding: 56px 0; }
  .x-sec-head { margin-bottom: 32px; }
  .x-bento, .x-cases, .x-posts, .x-int-grid, .x-trusts { grid-template-columns: 1fr; }
  .x-tile.b-wide { grid-column: auto; }
  .x-langgrid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .x-lang { padding: 14px 4px; }
  .x-lang small { display: none; }
  .x-steps { grid-auto-flow: row; grid-template-columns: 1fr; }
  .x-tablist [role="tab"] { height: 44px; padding: 0 14px; font-size: 14px; }
}

/* Blog covers (row 98): a picture on top of each article card and under the article title. */
.x-post-cover { display: block; width: calc(100% + 0px); aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 14px; margin-bottom: 16px; background: #eef5f1; }
.x-cover { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 22px; margin: 0 0 24px; background: #eef5f1; }
