:root {
  --cg-gold: #ffbd37;
  --cg-gold-soft: #ffe18a;
  --cg-red: #ff3a24;
  --cg-ink: #090303;
  --cg-panel: rgba(28, 7, 4, 0.84);
  --cg-line: rgba(255, 174, 33, 0.52);
  --cg-text: #f8f2ed;
  --cg-muted: #c4b3aa;
}

body[data-cardgov="true"] { background: #080202; }
.cardgov-page { overflow: hidden; background: #080202; color: var(--cg-text); }
.cg-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.cg-section { position: relative; padding: 92px 0; border-top: 1px solid rgba(255, 79, 37, 0.74); }
.cg-section::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 0, rgba(155, 35, 12, 0.18), transparent 46%); }
.cg-section > .cg-container { position: relative; z-index: 1; }
.cg-eyebrow { margin: 0 0 12px; color: var(--cg-gold); font-size: 13px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
.cg-heading { max-width: 850px; margin: 0 auto 54px; text-align: center; }
.cg-heading.is-left { margin-left: 0; text-align: left; }
.cg-heading h2 { margin: 0; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.08; letter-spacing: -.04em; }
.cg-heading h2 span { color: var(--cg-gold); }
.cg-heading > p:last-child { max-width: 750px; margin: 16px auto 0; color: var(--cg-muted); font-size: 16px; line-height: 1.75; }
.cg-heading.is-left > p:last-child { margin-left: 0; }

.cg-hero { position: relative; min-height: 720px; padding: 126px 0 54px; background-image: linear-gradient(90deg, rgba(4, 1, 1, .9) 0%, rgba(7, 2, 2, .72) 28%, rgba(7, 2, 2, .28) 45%, rgba(7, 2, 2, .04) 62%), linear-gradient(180deg, rgba(5, 1, 1, .24), transparent 55%, rgba(5, 1, 1, .64)), url('../assets/card-games-hero-desktop-v2.webp'); background-position: center; background-size: cover; background-repeat: no-repeat; border-bottom: 1px solid #ef3f20; isolation: isolate; }
.cg-hero-shade { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(3, 0, 0, .18), transparent 32%, transparent 76%, rgba(5, 0, 0, .5)); pointer-events: none; }
.cg-hero-inner { position: relative; z-index: 1; min-height: 540px; display: grid; grid-template-columns: minmax(360px, 550px) 1fr; align-items: center; }
.cg-hero-copy { position: relative; z-index: 2; text-align: left; }
.cg-hero h1 { max-width: 540px; margin: 0; font-size: clamp(48px, 4.6vw, 68px); line-height: .98; letter-spacing: -.05em; text-wrap: balance; text-shadow: 0 5px 28px rgba(0, 0, 0, .95); }
.cg-hero h1 span { color: var(--cg-gold-soft); }
.cg-hero-copy > p:not(.cg-eyebrow) { max-width: 540px; margin: 18px 0 0; color: #fff4eb; font-size: 16px; line-height: 1.7; text-shadow: 0 3px 14px #000; }
.cg-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cg-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 22px; border: 1px solid rgba(255, 193, 64, .72); border-radius: 999px; background: rgba(17, 4, 3, .74); color: #fff8ef; font-weight: 800; text-decoration: none; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); backdrop-filter: blur(8px); transition: transform .22s ease, border-color .22s ease, background .22s ease; }
.cg-button:hover { transform: translateY(-2px); border-color: #ffe08a; }
.cg-button.is-primary { border-color: #ffb62e; background: linear-gradient(135deg, #ffe27b, #ff991e); color: #391100; box-shadow: 0 12px 28px rgba(255, 79, 23, .28); }
.cg-marquee { position: relative; z-index: 3; overflow: hidden; border-block: 1px solid rgba(255, 88, 35, .72); background: linear-gradient(90deg, #150403, #3d0d08 48%, #150403); }
.cg-marquee-track { width: max-content; display: flex; animation: cg-marquee 28s linear infinite; }
.cg-marquee-set { min-width: 100vw; display: flex; align-items: center; justify-content: space-around; gap: 34px; padding: 17px 32px; color: #f7e9dc; font-size: 12px; font-weight: 800; letter-spacing: .14em; white-space: nowrap; }
.cg-marquee-set i { color: var(--cg-gold); font-style: normal; text-shadow: 0 0 12px var(--cg-red); }
@keyframes cg-marquee { to { transform: translateX(-50%); } }

.cg-rules { background: linear-gradient(180deg, #100302, #080202 86%); }
.cg-rules-stage { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(300px, 410px) minmax(220px, 1fr); grid-template-rows: 1fr 1fr; gap: 24px 34px; align-items: center; }
.cg-rulebook { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0; text-align: center; }
.cg-rulebook img { width: min(100%, 390px); height: 430px; object-fit: contain; filter: drop-shadow(0 22px 32px rgba(255, 58, 20, .18)); }
.cg-rulebook figcaption { margin-top: -20px; color: var(--cg-gold-soft); font-size: 13px; font-weight: 700; letter-spacing: .05em; }
.cg-info-card { display: flex; align-items: center; gap: 14px; min-height: 106px; padding: 18px; border: 1px solid var(--cg-line); border-radius: 18px; background: linear-gradient(135deg, rgba(62, 14, 9, .9), rgba(16, 4, 3, .9)); box-shadow: inset 0 0 26px rgba(255, 75, 25, .06); }
.cg-info-card img { width: 62px; height: 62px; object-fit: contain; flex: 0 0 auto; }
.cg-info-card h3 { margin: 0 0 5px; font-size: 17px; }
.cg-info-card p { margin: 0; color: var(--cg-muted); font-size: 13px; line-height: 1.5; }
.cg-card-one, .cg-card-three { text-align: right; }
.cg-card-one img, .cg-card-three img { order: 2; }
.cg-card-two { grid-column: 3; grid-row: 1; }
.cg-card-three { grid-column: 1; grid-row: 2; }
.cg-card-four { grid-column: 3; grid-row: 2; }

.cg-process { background: linear-gradient(180deg, #090202, #150402 48%, #080202); }
.cg-process-list { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; }
.cg-process-list::before { content: ""; position: absolute; top: 78px; left: 11%; right: 11%; height: 1px; background: linear-gradient(90deg, transparent, var(--cg-gold), var(--cg-red), var(--cg-gold), transparent); }
.cg-process-list li { position: relative; padding: 12px 18px 0; text-align: center; }
.cg-process-list li:not(:last-child)::after { content: "›"; position: absolute; top: 62px; right: -19px; z-index: 2; color: var(--cg-gold); font-size: 40px; text-shadow: 0 0 12px var(--cg-red); }
.cg-step-icon { position: relative; z-index: 1; width: 138px; height: 138px; display: grid; place-items: center; margin: 0 auto 20px; border: 1px solid var(--cg-line); border-radius: 50%; background: radial-gradient(circle at 48% 38%, #5f1c0d, #190503 64%, #080202); box-shadow: 0 0 28px rgba(255, 64, 24, .17); }
.cg-step-icon img { width: 84px; height: 84px; object-fit: contain; }
.cg-step-icon b { position: absolute; bottom: -9px; left: 50%; translate: -50% 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(#ffd767, #ff8b16); color: #3a1000; font-size: 13px; box-shadow: 0 0 14px rgba(255, 137, 15, .6); }
.cg-process-list h3 { margin: 0 0 8px; font-size: 20px; }
.cg-process-list p { margin: 0; color: var(--cg-muted); font-size: 14px; line-height: 1.6; }

.cg-technical { background: #0b0302; }
.cg-table-wrap { overflow-x: auto; border: 1px solid var(--cg-line); border-radius: 18px; background: rgba(9, 3, 2, .9); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.cg-table-wrap table { width: 100%; min-width: 990px; border-collapse: collapse; }
.cg-table-wrap th, .cg-table-wrap td { padding: 17px 16px; border-right: 1px solid rgba(255, 181, 52, .17); border-bottom: 1px solid rgba(255, 181, 52, .17); text-align: left; font-size: 13px; line-height: 1.45; }
.cg-table-wrap thead th { background: linear-gradient(180deg, rgba(77, 20, 10, .92), rgba(29, 7, 4, .92)); color: var(--cg-gold-soft); font-size: 12px; letter-spacing: .03em; text-transform: uppercase; }
.cg-table-wrap tbody th { color: #fff; }
.cg-table-wrap tbody td { color: #d9cbc4; }
.cg-table-wrap tr:last-child > * { border-bottom: 0; }
.cg-table-wrap tr > *:last-child { border-right: 0; }
.cg-table-wrap a { color: var(--cg-gold); font-weight: 700; }
.cg-status { display: inline-flex; align-items: center; gap: 7px; color: #8fe7ff; font-weight: 700; white-space: nowrap; }
.cg-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #27b7ff; box-shadow: 0 0 10px #27b7ff; }
.cg-demo-note { margin: 13px 0 0; color: #967e73; font-size: 12px; text-align: right; }

.cg-monitor { min-height: 760px; padding-bottom: 118px; background-image: linear-gradient(180deg, rgba(6, 1, 1, .9) 0%, rgba(7, 1, 1, .38) 30%, rgba(6, 1, 1, .18) 66%, rgba(6, 1, 1, .9) 100%), linear-gradient(90deg, rgba(5, 1, 1, .62), transparent 28%, transparent 72%, rgba(5, 1, 1, .62)), url('../assets/card-games-monitoring-v1.webp'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.cg-monitor::after { background: linear-gradient(180deg, rgba(139, 29, 11, .16), transparent 35%, rgba(154, 27, 10, .12)); }
.cg-monitor .cg-heading { margin-bottom: 30px; text-shadow: 0 4px 18px #000; }
.cg-monitor-stage { position: relative; min-height: 410px; }
.cg-monitor-card { position: absolute; z-index: 2; width: 300px; display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--cg-line); border-radius: 16px; background: rgba(20, 5, 3, .88); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); backdrop-filter: blur(8px); }
.cg-monitor-card.is-left { left: 24px; }
.cg-monitor-card.is-right { right: 24px; }
.cg-monitor-card.is-top { top: 74px; }
.cg-monitor-card.is-bottom { bottom: 74px; }
.cg-monitor-card img { width: 58px; height: 58px; object-fit: contain; }
.cg-monitor-card h3 { margin: 0 0 5px; font-size: 15px; }
.cg-monitor-card p { margin: 0; color: var(--cg-muted); font-size: 12px; line-height: 1.45; }

.cg-history { background: #0b0302; }
.cg-timeline { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 26px 0 0; list-style: none; }
.cg-timeline::before { content: ""; position: absolute; top: 34px; left: 9%; right: 9%; border-top: 2px dotted var(--cg-gold); opacity: .7; }
.cg-timeline li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 34px 15px 0; text-align: center; }
.cg-timeline i { position: absolute; top: 0; z-index: 1; width: 18px; height: 18px; border: 3px solid var(--cg-gold); border-radius: 50%; background: #130402; box-shadow: 0 0 14px var(--cg-red); }
.cg-timeline strong { color: #fff; font-size: 17px; }
.cg-timeline span { margin-top: 7px; color: #ebd9cd; font-size: 13px; line-height: 1.45; }
.cg-timeline small { margin-top: 6px; color: #967e73; }

.cg-faq { background: linear-gradient(180deg, #0b0302, #170503); }
.cg-faq-layout { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); gap: 52px; align-items: center; }
.cg-faq-art { align-self: stretch; display: grid; place-items: center; }
.cg-faq-art img { width: 100%; max-height: 560px; object-fit: cover; object-position: center; border-radius: 28px; border: 1px solid rgba(255, 160, 25, .35); mask-image: linear-gradient(to bottom, black 80%, transparent); }
.cg-faq .cg-heading { margin-bottom: 28px; }
.cg-faq-list .faq-item { border-color: rgba(255, 168, 34, .38); background: rgba(20, 5, 3, .72); }
.cg-faq-list .faq-item.is-open { border-color: rgba(255, 80, 34, .8); background: linear-gradient(135deg, rgba(77, 13, 8, .92), rgba(25, 5, 3, .9)); }

@media (max-width: 980px) {
  .cg-hero { min-height: 680px; padding-top: 112px; }
  .cg-hero-inner { min-height: 520px; grid-template-columns: minmax(320px, 500px) 1fr; }
  .cg-hero h1 { font-size: clamp(46px, 5.7vw, 58px); }
  .cg-rules-stage { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .cg-rulebook { grid-column: 1 / 3; grid-row: 2; }
  .cg-card-one, .cg-card-three { text-align: left; }
  .cg-card-one img, .cg-card-three img { order: 0; }
  .cg-card-one { grid-column: 1; grid-row: 1; }
  .cg-card-two { grid-column: 2; grid-row: 1; }
  .cg-card-three { grid-column: 1; grid-row: 3; }
  .cg-card-four { grid-column: 2; grid-row: 3; }
  .cg-process-list { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .cg-process-list::before, .cg-process-list li::after { display: none; }
  .cg-monitor-card { width: 265px; }
  .cg-faq-layout { grid-template-columns: 1fr; }
  .cg-faq-art { display: none; }
  .cg-heading.is-left { text-align: center; margin-inline: auto; }
  .cg-heading.is-left > p:last-child { margin-inline: auto; }
}

@media (max-width: 700px) {
  .cg-container { width: min(100% - 28px, 1180px); }
  .cg-section { padding: 68px 0; }
  .cg-heading { margin-bottom: 38px; }
  .cg-heading h2 { font-size: 34px; }
  .cg-heading > p:last-child { font-size: 14px; }
  .cg-hero { min-height: 760px; padding: 0; display: grid; place-items: start center; background-image: linear-gradient(180deg, rgba(3, 0, 0, .88) 0%, rgba(3, 0, 0, .7) 31%, rgba(3, 0, 0, .18) 49%, transparent 66%, rgba(5, 0, 0, .5) 100%), url('../assets/card-games-hero-mobile-v2.webp'); background-position: center; background-size: cover; background-repeat: no-repeat; }
  .cg-hero-shade { background: linear-gradient(180deg, rgba(3, 0, 0, .2), transparent 46%, transparent 78%, rgba(5, 0, 0, .42)); }
  .cg-hero-inner { display: block; min-height: 760px; }
  .cg-hero-copy { max-width: 560px; margin-inline: auto; padding-top: 116px; text-align: center; }
  .cg-hero h1 { font-size: 42px; }
  .cg-hero h1, .cg-hero-copy > p:not(.cg-eyebrow) { margin-inline: auto; }
  .cg-hero-copy > p:not(.cg-eyebrow) { font-size: 14px; }
  .cg-hero-actions { justify-content: center; }
  .cg-button { min-height: 44px; padding-inline: 17px; font-size: 13px; }
  .cg-marquee-set { gap: 26px; padding: 14px 22px; font-size: 10px; }
  .cg-rules-stage { display: flex; flex-direction: column; }
  .cg-rulebook { order: -1; }
  .cg-rulebook img { height: 330px; }
  .cg-info-card { width: 100%; }
  .cg-process-list { grid-template-columns: 1fr; }
  .cg-process-list li { max-width: 360px; margin-inline: auto; }
  .cg-monitor { min-height: 0; padding-bottom: 72px; background-size: auto 300px; background-position: center 200px; background-repeat: no-repeat; background-color: #080202; }
  .cg-monitor .cg-heading { margin-bottom: 220px; }
  .cg-monitor-stage { display: flex; min-height: 0; flex-direction: column; gap: 12px; }
  .cg-monitor-card { position: static; width: 100%; }
  .cg-timeline { grid-template-columns: 1fr; gap: 0; padding-left: 22px; }
  .cg-timeline::before { top: 0; bottom: 0; left: 8px; right: auto; width: 0; height: auto; border-top: 0; border-left: 2px dotted var(--cg-gold); }
  .cg-timeline li { align-items: flex-start; min-height: 110px; padding: 0 0 26px 28px; text-align: left; }
  .cg-timeline i { top: 2px; left: -22px; }
  .cg-demo-note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .cardgov-page *, .cardgov-page *::before, .cardgov-page *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
