/* =====================================================================
   Game Stream Platform — the transformation of mobile gaming.
   Editorial tech theme: white content, deep navy chrome, geometric display
   type, violet accent with teal labels. Mobile-first, flex/grid.
   ===================================================================== */
:root {
    --bg: #0b1026;            /* navy top bar + footer */
    --topbar: #0b1026;
    --cream: #ffffff;         /* page / content background */
    --cream-2: #f3f4fa;       /* alternate band: faint cool grey */
    --ink: #0b1026;           /* headings / nav */
    --text: #383d52;          /* body */
    --muted: #666c84;
    --on-dark: #eceefa;
    --on-dark-muted: #a7acc6;
    --accent: #5b3df5;        /* violet — rules, buttons, hovers */
    --accent-deep: #4426d8;
    --accent-ink: #0e7490;    /* teal — overlines, labels, links */
    --line: rgba(11, 16, 38, .12);
    --line-dark: rgba(255, 255, 255, .14);
    --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
    --sans: 'Manrope', 'Segoe UI', system-ui, sans-serif;
    --container: 1200px;
    --gutter: 22px;
    --header-h: 86px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; font-family: var(--sans); font-weight: 400; font-size: 16.5px; line-height: 1.78; color: var(--text); background: var(--cream); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
h1, h2, h3, h4, p, li, a { overflow-wrap: break-word; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(780px + var(--gutter) * 2); }

/* ---------- shared type ---------- */
.overline { font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink); }
.display { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 46px); line-height: 1.12; letter-spacing: -.015em; color: var(--ink); }
.display--sm { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.01em; }
.lede { font-size: 18.5px; line-height: 1.72; color: var(--text); }
.rule { display: block; width: 54px; height: 3px; margin: 18px auto; border-radius: 2px; background: linear-gradient(90deg, var(--accent), #0ea5c6); }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 50px; padding: 0 32px; border: 1px solid var(--accent); border-radius: 6px; cursor: pointer;
    font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
    color: #fff; background: var(--accent); transition: background-color .25s, border-color .25s;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* ---------- top bar + header ---------- */
.site-topbar { height: 22px; background: var(--topbar); }
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 30px; min-height: var(--header-h); max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.site-logo { display: inline-flex; align-items: center; margin-right: auto; }
.brand-logo { height: 38px; width: auto; max-width: min(270px, calc(100vw - 130px)); object-fit: contain; object-position: left center; }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--ink); }
.primary-nav__list { display: flex; align-items: center; gap: 28px; }
.primary-nav__link { font-size: 13.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink); padding: 8px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.primary-nav__link:hover { color: var(--accent); border-color: var(--accent); }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero img { width: 100%; height: clamp(300px, 42vw, 520px); object-fit: cover; }

/* ---------- intro (centered heading + lede, then readable body) ---------- */
.intro { padding: clamp(50px, 6.5vw, 84px) 0; }
.intro__head { text-align: center; }
.intro__head .overline { display: block; margin-bottom: 18px; }
.intro__head .lede { margin-top: 4px; }
.intro__body { margin-top: 26px; }
.intro__body p + p { margin-top: 16px; }

/* ---------- section header (centered, shared) ---------- */
.section-head { text-align: center; max-width: 820px; margin: 0 auto clamp(30px, 4vw, 46px); }
.section-head .overline { display: block; margin-bottom: 14px; }

/* ---------- prose sections (centered head, readable body) ---------- */
.prose { padding: clamp(52px, 7vw, 92px) 0; }
.prose__body p + p { margin-top: 16px; }
.band-alt { background: var(--cream-2); }

/* ---------- split (centered header + image/text row) ---------- */
.split { padding: clamp(52px, 7vw, 92px) 0; }
.split__grid { display: grid; gap: 34px; align-items: center; }
.split__grid + .split__grid { margin-top: clamp(40px, 6vw, 72px); }
.split__media img { width: 100%; height: 100%; max-height: 440px; object-fit: cover; border-radius: 10px; }
.split__text p + p { margin-top: 16px; }
.split__text h3 { font-family: var(--display); font-weight: 600; font-size: 23px; line-height: 1.25; color: var(--ink); }
.split__text h3 ~ h3 { margin-top: 30px; }
.split__text h3 + p { margin-top: 10px; }
.split__lead { max-width: 780px; margin: 0 auto clamp(36px, 5vw, 56px); }
.split__lead p + p { margin-top: 16px; }

/* ---------- download statistics ---------- */
.stats { display: grid; gap: 20px; margin: clamp(32px, 5vw, 50px) 0; }
.stat { display: flex; flex-direction: column; padding: 26px 24px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.stat__label { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--ink); }
.stat__figures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.stat__year { display: block; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.stat__value { display: block; margin-top: 2px; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.1; color: var(--accent); }
.stat__figures div:first-child .stat__value { color: var(--ink); }
.stat__unit { font-size: 18px; }
.stat__note { margin-top: 16px; font-size: 15px; line-height: 1.68; }
.stats__caption { margin-top: -26px; margin-bottom: 30px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- year-over-year comparison (industry) ---------- */
.deltas { display: grid; gap: 18px; margin: 30px 0; }
.delta { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.delta__value { flex: none; min-width: 108px; font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; }
.delta--down .delta__value { color: #b4233a; }
.delta--up .delta__value { color: #0f7a4f; }
.delta__label { font-size: 15px; line-height: 1.55; color: var(--text); }
.delta__label strong { display: block; font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--ink); }

/* ---------- closing band ---------- */
.closing { padding: clamp(56px, 7vw, 96px) 0; background: var(--bg); color: var(--on-dark-muted); }
.closing .overline { color: #67d4ea; }
.closing .display { color: #fff; }
.closing .prose__body p { color: var(--on-dark); opacity: .88; }

/* ---------- legal pages ---------- */
.page-head { padding: clamp(46px, 7vw, 86px) 0 clamp(30px, 4vw, 50px); background: var(--bg); color: var(--on-dark); text-align: center; }
.page-head .overline { color: #67d4ea; }
.page-head__title { font-family: var(--display); font-weight: 700; font-size: clamp(32px, 5vw, 48px); letter-spacing: -.015em; color: #fff; margin-top: 12px; }
.page-head__meta { margin-top: 10px; color: var(--on-dark-muted); font-size: 15px; }
.page-head .breadcrumbs { margin-bottom: 14px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; opacity: .6; }
.breadcrumbs a { color: #b6a8ff; }
.legal { padding: clamp(44px, 6vw, 72px) 0 90px; }
.legal__body h2 { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 3vw, 28px); color: var(--ink); margin: 34px 0 10px; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p + p, .legal__body p + ul, .legal__body ul + p { margin-top: 12px; }
.legal__body ul { display: grid; gap: 8px; margin: 12px 0; }
.legal__body ul li { position: relative; padding-left: 22px; }
.legal__body ul li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.legal__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal__body strong { color: var(--ink); font-weight: 700; }

/* ---------- 404 ---------- */
.notfound { padding: clamp(70px, 12vw, 150px) 0; text-align: center; }
.notfound__code { font-family: var(--display); font-weight: 700; font-size: clamp(80px, 18vw, 150px); line-height: 1; color: var(--accent); }
.notfound p { max-width: 460px; margin: 14px auto 28px; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg); color: var(--on-dark-muted); padding: clamp(56px, 7vw, 80px) 0 34px; }
.site-footer__top { display: grid; gap: 36px; padding-bottom: 34px; border-bottom: 1px solid var(--line-dark); }
.site-footer__logo { display: inline-flex; padding: 10px 14px; border-radius: 8px; background: #fff; }
.site-footer__logo .brand-logo { height: 28px; }
.site-footer__desc { margin-top: 18px; max-width: 430px; font-size: 15px; line-height: 1.7; }
.site-footer__title { font-weight: 700; font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; color: #67d4ea; margin-bottom: 14px; }
.site-footer__links { display: grid; gap: 9px; }
.site-footer__links a, .site-footer__contact a, .site-footer__legal a { transition: color .2s; }
.site-footer__links a:hover, .site-footer__contact a:hover, .site-footer__legal a:hover { color: #fff; }
.site-footer__bottom { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; font-size: 14px; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- mobile nav ---------- */
@media (max-width: 1060px) {
    :root { --header-h: 72px; }
    .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: transparent; cursor: pointer; margin-left: 4px; }
    .nav-toggle span { display: block; height: 1.5px; background: var(--ink); transition: transform .25s, opacity .2s; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
    .primary-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 16px 24px -14px rgba(0,0,0,.25); display: none; }
    .primary-nav.is-open { display: block; }
    .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 22px; }
    .primary-nav__link { display: block; padding: 15px 2px; border-bottom: 1px solid var(--line); }
    .primary-nav__list li:last-child .primary-nav__link { border-bottom: 0; }
    .primary-nav__link:hover { color: var(--accent); border-color: var(--line); }
}

/* ---------- breakpoints ---------- */
@media (min-width: 720px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .deltas { grid-template-columns: 1fr 1fr; }
    .site-footer__top { grid-template-columns: 1.6fr 1fr 1.1fr; }
}
@media (min-width: 900px) {
    .split__grid { grid-template-columns: 1fr 1fr; gap: 56px; }
    .split--reverse .split__media, .split__grid--reverse .split__media { order: 2; }
    .split__grid--top { align-items: start; }
    .split__grid--top .split__media { position: sticky; top: calc(var(--header-h) + 24px); }
}
@media (min-width: 1100px) {
    .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { transition: none !important; }
}
