/**
 * Home page, direction "Stage" (views/site/home.php). A soft grey ground with
 * white panels, the checkout as a dark stage that plays a payment with real
 * skins, and skins wherever the page talks about them. Built phone first; from
 * 1200px the hero deals skins in beside the headline, from 1700px everything
 * gets more room. Movement runs only for visitors who did not ask for less.
 */
html[data-ground="light"]:has(.hx) { --bg: #EEF0F3; --panel: #E4E7EC; }
.hx { --hx-ink: #14151A; --hx-r: 22px; overflow-x: clip; }
.hx h2 { font-size: clamp(28px, 3.2vw, 46px); line-height: 1.06; letter-spacing: -0.025em; margin: 0; }
.hx-sec { padding-block: clamp(28px, 4vw, 56px); }
.hx-sec:last-of-type { padding-bottom: clamp(48px, 7vw, 96px); }

/* Buttons of this page: larger, squarer than the shared pill. */
.hx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 14px 26px; border-radius: 14px; background: #FFFFFF; color: var(--hx-ink); font: 600 17px/1.1 var(--f-body); text-decoration: none; transition: transform .18s ease, background-color .18s ease; }
.hx-btn:hover { transform: translateY(-2px); color: var(--hx-ink); }
.hx-btn--brand { background: var(--brand); font-weight: 700; }
.hx-btn--ink { background: var(--hx-ink); color: #FFFFFF; }
.hx-btn--ink:hover { color: #FFFFFF; }

/* A skin: the official picture on a tinted plate, its name under it. */
.hx-skin { margin: 0; min-width: 0; border-radius: 14px; overflow: hidden; background: #24262E; display: flex; flex-direction: column; }
.hx-skin img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; padding: 10px; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.hx-skin--dota2 img { object-fit: cover; padding: 0; }
.hx-skin:hover img { transform: scale(1.08); }
.hx-skin figcaption { padding: 8px 10px 10px; font-size: 13px; font-weight: 600; line-height: 1.25; color: #E6E7EC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-skin--cs2 { background: linear-gradient(180deg, #2B2E38, #1E2027); }
.hx-skin--rust { background: linear-gradient(180deg, #3A2A24, #221C1A); }
.hx-skin--dota2 { background: #1B1E26; }

/* ---------- Hero -------------------------------------------------------- */
.hx-hero { position: relative; padding-block: clamp(28px, 5vw, 72px) clamp(24px, 3vw, 40px); }
.hx-hero__text { text-align: center; position: relative; z-index: 1; }
.hx-hero h1 { max-width: 20ch; margin-inline: auto; font-size: clamp(38px, 5.6vw, 100px); line-height: 1.02; letter-spacing: -0.035em; }
.hx-hero h1 span { color: #7A7D88; }
.hx-lead { max-width: 58ch; margin: clamp(16px, 2vw, 26px) auto 0; font-size: clamp(17px, 1.35vw, 22px); line-height: 1.5; color: var(--muted); }
.hx-actions { margin-top: clamp(20px, 2.4vw, 32px); display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hx-points { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; font-size: 15px; font-weight: 500; color: var(--muted); }
.hx-points li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--brand); vertical-align: 2px; }

/* Skins dealt in beside the headline (wide screens only). */
.hx-hero__deal { display: none; }
@media (min-width: 1200px) {
    .hx-hero__deal { display: block; position: absolute; inset: 0; pointer-events: none; }
    .hx-card { position: absolute; width: clamp(150px, 11.5vw, 250px); border-radius: 16px; overflow: hidden; background: #24262E; box-shadow: 0 24px 40px -22px rgba(20, 21, 26, .55); }
    .hx-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; padding: 12px; }
    .hx-card.hx-skin--dota2 img { object-fit: cover; padding: 0; }
    .hx-card--1 { left: 3.5%; top: 9%; rotate: -8deg; }
    .hx-card--2 { left: 10%; top: 38%; rotate: 5deg; }
    .hx-card--3 { left: 2%; top: 64%; rotate: -4deg; }
    .hx-card--4 { right: 3.5%; top: 7%; rotate: 7deg; }
    .hx-card--5 { right: 10%; top: 36%; rotate: -6deg; }
    .hx-card--6 { right: 2%; top: 63%; rotate: 4deg; }
    .hx-hero__deal { bottom: auto; height: clamp(420px, 36vw, 640px); }
}

/* ---------- The stage: a payment played with real skins ------------------- */
.hx-stage { margin-top: clamp(28px, 4vw, 56px); padding: clamp(12px, 1.6vw, 22px); border-radius: clamp(18px, 2vw, 30px); background: var(--hx-ink); color: #FFFFFF; position: relative; z-index: 1; }
.hx-stage__tabs, .hx-games__tabs { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; grid-auto-flow: unset; }
.hx-stage__tabs .player__tab, .hx-games__tabs .player__tab { width: auto; padding: 12px 18px; border: 0; border-radius: 11px; background: #24262E; color: #C9CCD4; font: 600 15px/1.2 var(--f-body); overflow: hidden; transition: background-color .2s, color .2s; }
.hx-stage__tabs .player__tab.is-on, .hx-games__tabs .player__tab.is-on { background: var(--brand); color: var(--hx-ink); }
.hx-stage__tabs .player__tab::before, .hx-games__tabs .player__tab::before { top: auto; bottom: 0; height: 3px; background: rgba(20, 21, 26, .45); }
.hx-games__tabs .player__tab { background: #FFFFFF; color: var(--hx-ink); }
.hx-stage__frames { margin-top: clamp(12px, 1.4vw, 20px); display: grid; }
.hx-frame { grid-area: 1 / 1; position: static !important; min-width: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s; }
.hx-frame.is-on { visibility: visible; transition: opacity .45s ease; }
.hx-stage:not(.is-ready) .hx-frame:first-child { visibility: visible; }

.hx-frame--pick { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.hx-inv { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hx-inv .hx-skin { border: 2px solid transparent; position: relative; }
.hx-inv .is-picked { border-color: var(--brand); }
.hx-inv .is-picked::after { content: ""; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314151A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17.5 19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.hx-bill { display: flex; flex-direction: column; gap: 12px; padding: clamp(16px, 1.6vw, 26px); border-radius: 14px; background: #FFFFFF; color: var(--hx-ink); }
.hx-bill__to { font-size: 15px; color: #4A4D57; }
.hx-bill__count { font-size: clamp(22px, 2vw, 32px); line-height: 1.1; }
.hx-bill__count span { color: #C45F00; }
.hx-bill__go { margin-top: auto; padding: 15px; border-radius: 11px; background: var(--hx-ink); color: #FFFFFF; font-weight: 700; font-size: 16px; text-align: center; }

.hx-frame--trade, .hx-frame--paid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: clamp(20px, 3vw, 48px) 8px; text-align: center; }
.hx-trade { width: 100%; max-width: 980px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.hx-trade__from { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hx-trade__line { height: 3px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--brand) 0 10px, transparent 10px 20px); background-size: 20px 3px; }
.hx-trade__to { padding: clamp(18px, 2vw, 34px) 16px; border: 2px dashed #4A4D57; border-radius: 14px; font-weight: 700; font-size: clamp(17px, 1.4vw, 22px); }
.hx-frame__say { margin: 0; font-size: clamp(16px, 1.3vw, 20px); color: #C9CCD4; }
.hx-frame__big { margin: 0; font-size: clamp(30px, 3.6vw, 60px); font-weight: 700; letter-spacing: -0.02em; }
.hx-check { width: clamp(84px, 8vw, 132px); height: auto; fill: none; stroke: var(--brand); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 720px) {
    .hx-inv { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .hx-frame--pick { grid-template-columns: minmax(0, 2.6fr) minmax(220px, 1fr); }
    .hx-trade { grid-template-columns: minmax(0, 3fr) minmax(60px, 1fr) minmax(0, 1.2fr); }
}

/* ---------- Panels ------------------------------------------------------- */
.hx-duo { display: grid; gap: clamp(14px, 1.6vw, 24px); grid-template-columns: minmax(0, 1fr); }
.hx-panel { padding: clamp(22px, 3vw, 48px); border-radius: var(--hx-r); background: #FFFFFF; min-width: 0; }
.hx-panel > p, .hx-games__head p, .hx-zero p { margin: 14px 0 0; max-width: 56ch; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.5; color: var(--muted); }
.hx-panel .textlink { display: inline-block; margin-top: 18px; }
.hx-panel--ink { background: var(--hx-ink); display: flex; align-items: center; justify-content: center; }
.hx-panel--ink .screen { border: 0; }
.hx-kicker { display: inline-block; margin-bottom: 12px; font-size: 15px; font-weight: 700; }
.hx-kicker--in { color: #B25600; }
.hx-kicker--out { color: #6A3FD0; }
.hx-rows { list-style: none; margin: 22px 0 0; padding: 0; font-size: 17px; font-weight: 500; }
.hx-rows li { padding: 13px 0; border-top: 1px solid var(--line); }
.hx-send { margin-top: 22px; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hx-defs { margin: 22px 0 0; }
.hx-defs div { padding: 14px 0; border-top: 1px solid var(--line); }
.hx-defs dt { font-weight: 700; font-size: 17px; }
.hx-defs dd { margin: 4px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.hx-chips { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hx-chips a { display: block; padding: 10px 15px; border-radius: 999px; background: var(--bg); color: var(--hx-ink); font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .18s, color .18s; }
.hx-chips a:hover { background: var(--hx-ink); color: #FFFFFF; }
@media (min-width: 900px) {
    .hx-duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hx-duo--brand { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
    .hx-send { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- The games: a wall of skins that changes ------------------------ */
.hx-games__head { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: end; justify-content: space-between; }
.hx-games__frames { margin-top: clamp(18px, 2vw, 30px); display: grid; }
.hx-wall { grid-area: 1 / 1; position: static !important; display: grid; gap: clamp(10px, 1vw, 16px); grid-template-columns: repeat(2, minmax(0, 1fr)); visibility: hidden; }
.hx-wall.is-on { visibility: visible; }
.hx-games:not(.is-ready) .hx-wall:first-child { visibility: visible; }
.hx-wall .hx-skin { border-radius: 18px; }
.hx-wall .hx-skin figcaption { font-size: 15px; padding: 10px 14px 13px; }
@media (min-width: 720px) { .hx-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .hx-wall { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- Zero ---------------------------------------------------------- */
.hx-zero { display: grid; gap: clamp(16px, 3vw, 48px); align-items: center; padding: clamp(24px, 3.4vw, 56px); border-radius: var(--hx-r); background: var(--brand); color: var(--hx-ink); }
.hx-zero__figure { font-size: clamp(96px, 13vw, 230px); line-height: .82; font-weight: 700; letter-spacing: -0.05em; }
.hx-zero p { color: var(--hx-ink); }
.hx-zero .hx-btn { margin-top: 20px; }
@media (min-width: 800px) { .hx-zero { grid-template-columns: auto minmax(0, 1fr); } }

.hx .faq { background: #FFFFFF; border-radius: var(--hx-r); padding: 6px clamp(18px, 2.4vw, 32px); }
.hx .hx-sec .hp-h { margin-bottom: 20px; }
.hx + .closing, .hx .closing { border-top: 0; }

/* ---------- More room on large screens ------------------------------------- */
@media (min-width: 1700px) {
    .hx .container--wide { max-width: 1680px; }
    .hx-skin figcaption { font-size: 15px; }
    .hx-stage__tabs .player__tab, .hx-games__tabs .player__tab { font-size: 17px; padding: 14px 22px; }
    .hx-rows, .hx-defs dt { font-size: 19px; }
    .hx-defs dd { font-size: 18px; }
    .hx-chips a { font-size: 17px; padding: 12px 18px; }
}

/* ---------- Movement -------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    /* The hero deals its skins in once. */
    .hx-card { animation: hx-deal .9s cubic-bezier(.2, .8, .2, 1) both; }
    .hx-card--1, .hx-card--4 { animation-delay: .1s; }
    .hx-card--2, .hx-card--5 { animation-delay: .22s; }
    .hx-card--3, .hx-card--6 { animation-delay: .34s; }
    @keyframes hx-deal { from { opacity: 0; translate: 0 60px; scale: .8; } to { opacity: 1; translate: 0 0; scale: 1; } }
    .hx-stage { animation: hx-up .8s .15s cubic-bezier(.2, .7, .2, 1) both; }
    @keyframes hx-up { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }

    /* Pick: the three skins are chosen one after the other. */
    .hx-stage.is-ready .hx-frame--pick.is-on .is-picked { animation: hx-pick .01s both; }
    .hx-stage.is-ready .hx-frame--pick.is-on .is-picked::after { animation: hx-pop .35s cubic-bezier(.3, 1.6, .5, 1) both; }
    .hx-stage.is-ready .hx-frame--pick.is-on .hx-pick--1, .hx-stage.is-ready .hx-frame--pick.is-on .hx-pick--1::after { animation-delay: .5s; }
    .hx-stage.is-ready .hx-frame--pick.is-on .hx-pick--2, .hx-stage.is-ready .hx-frame--pick.is-on .hx-pick--2::after { animation-delay: 1.1s; }
    .hx-stage.is-ready .hx-frame--pick.is-on .hx-pick--3, .hx-stage.is-ready .hx-frame--pick.is-on .hx-pick--3::after { animation-delay: 1.7s; }
    @keyframes hx-pick { from { border-color: transparent; } to { border-color: var(--brand); } }
    @keyframes hx-pop { from { opacity: 0; scale: 0; } to { opacity: 1; scale: 1; } }
    .hx-frame--pick.is-on .hx-bill__go { animation: hx-ready .5s 2.3s both; }
    @keyframes hx-ready { from { background: #8D919C; } to { background: var(--hx-ink); } }

    /* Trade: the skins lean towards the store, the line runs. */
    .hx-frame--trade.is-on .hx-trade__line { animation: hx-run .7s linear infinite; }
    @keyframes hx-run { to { background-position: 20px 0; } }
    .hx-frame--trade.is-on [class*="hx-move--"] { animation: hx-give 1.5s cubic-bezier(.3, .7, .2, 1) both; }
    .hx-frame--trade.is-on .hx-move--2 { animation-delay: .15s; }
    .hx-frame--trade.is-on .hx-move--3 { animation-delay: .3s; }
    @keyframes hx-give { 0% { opacity: 0; translate: -40px 0; } 45% { opacity: 1; translate: 0 0; } 100% { translate: 14px 0; } }
    .hx-frame--trade.is-on .hx-trade__to { animation: hx-take .5s 1.4s both; }
    @keyframes hx-take { from { border-color: #4A4D57; } to { border-color: var(--brand); border-style: solid; } }

    /* Paid: the tick is drawn. */
    .hx-check circle { stroke-dasharray: 277; }
    .hx-check path { stroke-dasharray: 60; }
    .hx-frame--paid.is-on .hx-check circle { animation: hx-draw .7s ease-out both; }
    .hx-frame--paid.is-on .hx-check path { animation: hx-draw .4s .6s ease-out both; }
    @keyframes hx-draw { from { stroke-dashoffset: 277; } to { stroke-dashoffset: 0; } }
    .hx-frame--paid.is-on .hx-frame__big { animation: hx-up .5s .7s both; }

    /* The wall: each game's skins arrive one after the other. */
    .hx-games.is-ready .hx-wall.is-on .hx-skin { animation: hx-tile .5s cubic-bezier(.2, .7, .2, 1) both; }
    .hx-wall .hx-skin:nth-child(2) { animation-delay: .06s !important; }
    .hx-wall .hx-skin:nth-child(3) { animation-delay: .12s !important; }
    .hx-wall .hx-skin:nth-child(4) { animation-delay: .18s !important; }
    .hx-wall .hx-skin:nth-child(5) { animation-delay: .24s !important; }
    .hx-wall .hx-skin:nth-child(6) { animation-delay: .3s !important; }
    @keyframes hx-tile { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
}
