/* ==========================================================================
   MCW Casino PK — "Midnight Lounge Directory" design system (black & gold)
   Matte black surfaces, single brass-gold accent,
   Outfit for text, JetBrains Mono for every number.
   ========================================================================== */

:root {
    --bg: #0A0908;               /* Lounge Black — page background (warm near-black) */
    --surface: #14110B;          /* Raised Black — raised bands */
    --card: #191510;             /* Card Black — card fill */
    --card-hover: #211B12;
    --border: rgba(200, 162, 74, 0.16);   /* Rail Border */
    --border-strong: rgba(200, 162, 74, 0.35);
    --text: #E9E6DA;
    --heading: #F2EFE3;          /* Ivory Chip */
    --muted: #A69C86;            /* Smoked Gold — secondary text */
    --brass: #C8A24A;            /* Brass Gold — the single accent */
    --brass-bright: #EAC166;
    --brass-deep: #A07E2E;
    --on-brass: #1A1508;
    --green: #3E9B6C;            /* Signal Green — verified only */
    --ember: #C96F3B;            /* Warn Ember — warnings only */
    --font-body: 'Outfit', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;
    --container: 1280px;
    --radius-card: 1rem;
    --radius-btn: 0.75rem;
    --section-gap: clamp(3rem, 8vw, 6rem);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.85);
    --transition: 200ms ease-out;
}

/* ---------- Reset / base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 106px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--brass-bright);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--brass);
}

button {
    font-family: inherit;
    cursor: pointer;
}

a,
button,
summary,
[role="button"] {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 200;
    background: var(--brass);
    color: var(--on-brass);
    padding: 0.6rem 1.2rem;
    border-radius: 0 0 var(--radius-btn) var(--radius-btn);
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    color: var(--on-brass);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.mono {
    font-family: var(--font-mono);
    font-weight: 500;
}

.accent {
    color: var(--brass);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    transition: transform 150ms ease-out, box-shadow 150ms ease-out,
                filter 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brass-bright) 0%, var(--brass) 45%, var(--brass-deep) 100%);
    color: var(--on-brass);
    box-shadow: 0 6px 18px -8px rgba(200, 162, 74, 0.55);
}

.btn-primary:hover {
    filter: brightness(1.08);
    color: var(--on-brass);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px -6px rgba(200, 162, 74, 0.5);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--heading);
}

.btn-ghost:hover {
    border-color: var(--brass);
    color: var(--brass-bright);
}

.btn-ghost:active {
    transform: translateY(1px);
}

.btn-sm {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: rgba(10, 9, 8, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 92px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.site-header .brand-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.site-footer .brand-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.brand-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand-name span {
    color: var(--brass);
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.2vw, 2rem);
    list-style: none;
}

.main-nav a {
    display: inline-block;
    padding: 0.4rem 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    color: var(--brass-bright);
}

.main-nav a.active {
    color: var(--brass);
    border-bottom-color: var(--brass);
}

.main-nav .nav-cta {
    border-bottom: none;
    color: var(--on-brass);
    letter-spacing: 0.02em;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.45rem;
    color: var(--heading);
}

.nav-toggle .icon-close {
    display: none;
}

body.nav-open .nav-toggle .icon-open {
    display: none;
}

body.nav-open .nav-toggle .icon-close {
    display: block;
}

/* ---------- Sections ---------- */

main {
    padding-top: 92px;
}

.section {
    padding-block: var(--section-gap);
}

.section-alt {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.section-head {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.section-head-text {
    max-width: 34rem;
}

.overline {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 0.6rem;
}

.section-title {
    font-size: clamp(1.5rem, 3.2vw, 2.25rem);
    margin-bottom: 0.4rem;
}

.section-sub {
    color: var(--muted);
    font-size: 1rem;
}

.rule {
    flex: 1;
    height: 1px;
    margin-bottom: 0.9rem;
    background: linear-gradient(90deg, rgba(200, 162, 74, 0.4) 0%, rgba(200, 162, 74, 0) 100%);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(10, 9, 8, 0.72) 0%, rgba(10, 9, 8, 0.94) 100%),
        url('/assets/images/hero-bg.jpg') center / cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 44rem;
    height: 44rem;
    background: radial-gradient(circle, rgba(200, 162, 74, 0.14) 0%, rgba(200, 162, 74, 0) 65%);
    pointer-events: none;
    animation: glow-drift 12s ease-in-out infinite alternate;
}

@keyframes glow-drift {
    from { transform: translate(0, 0); }
    to   { transform: translate(-6%, 8%); }
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding-block: var(--section-gap);
    position: relative;
}

.hero h1 {
    font-size: clamp(2rem, 4.6vw, 3.25rem);
    margin-bottom: 1.2rem;
}

.hero-sub {
    color: var(--muted);
    font-size: 1.125rem;
    max-width: 32rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.6rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.4rem, 4vw, 3rem);
    border-top: 1px solid var(--border);
    padding-top: 1.8rem;
}

.hero-stat .stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    color: var(--brass);
    margin-bottom: 0.2rem;
}

.hero-stat .stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Hero collage of floating APK tiles */

.hero-collage {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    transform: rotate(3deg);
}

.hero-collage .collage-col:last-child {
    padding-top: 2.5rem;
}

.collage-col {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.collage-tile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 0.9rem;
    box-shadow: var(--shadow-card);
}

.collage-tile img {
    width: 52px;
    height: 52px;
    border-radius: 0.7rem;
    object-fit: cover;
    border: 1px solid var(--border-strong);
}

.collage-tile .tile-name {
    display: block;
    font-weight: 600;
    color: var(--heading);
    font-size: 0.9rem;
    line-height: 1.3;
}

.collage-tile .tile-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--brass);
}

/* ---------- Trust bar ---------- */

.trust-bar {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding-block: 1.8rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.trust-item svg {
    flex-shrink: 0;
    color: var(--brass);
}

.trust-item .trust-title {
    display: block;
    font-weight: 600;
    color: var(--heading);
    font-size: 0.95rem;
}

.trust-item .trust-desc {
    font-size: 0.8rem;
    color: var(--muted);
}

/* ---------- APK cards ---------- */

.apk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.apk-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.apk-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: var(--border-strong);
    background: var(--card-hover);
}

.apk-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.apk-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apk-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.65rem;
    padding: 1rem;
}

.apk-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.apk-card-title a {
    color: var(--heading);
}

.apk-card-title a:hover {
    color: var(--brass-bright);
}

.apk-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--muted);
}

.apk-card-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.apk-card-meta svg {
    color: var(--brass);
}

.apk-card-bonus {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--brass);
}

.apk-card .btn {
    margin-top: auto;
}

/* Badges — static positioned labels, never absolute stickers */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    position: static;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    width: fit-content;
}

.badge-new {
    background: var(--brass);
    color: var(--on-brass);
}

.badge-hot {
    background: transparent;
    border: 1px solid var(--ember);
    color: var(--ember);
}

/* Stars */

.stars {
    display: inline-flex;
    gap: 0.12rem;
    vertical-align: middle;
}

.star-full,
.star-half {
    color: var(--brass-bright);
}

.star-empty {
    color: rgba(166, 156, 134, 0.25);
}

/* ---------- Warning band ---------- */

.warning-band {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--ember);
    border-radius: var(--radius-card);
    padding: clamp(1.4rem, 3vw, 2.2rem);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.4rem;
    align-items: start;
}

.age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--ember);
    color: var(--ember);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 1rem;
    flex-shrink: 0;
}

.warning-band h2,
.warning-band h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.warning-band p {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 68ch;
}

.tip-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    list-style: none;
}

.tip-chips li {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    color: var(--muted);
    background: var(--bg);
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: var(--section-gap);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 2rem;
    padding-block: 3rem 2rem;
}

.footer-note,
.footer-warning p {
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 0.9rem;
    max-width: 34ch;
}

.footer-warning p {
    max-width: 40ch;
}

.footer-heading {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 1rem;
}

.footer-nav ul {
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.footer-nav a {
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-nav a:hover {
    color: var(--brass-bright);
}

.footer-warning .age-badge {
    width: 34px;
    height: 34px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-block: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 2rem;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--muted);
}

.footer-disclaimer {
    max-width: 60ch;
}

/* ---------- Scroll to top ---------- */

.scroll-top {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 90;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--card);
    color: var(--brass);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--card-hover);
    border-color: var(--brass);
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
    padding-block: 1.1rem 0;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--muted);
}

.breadcrumb a:hover {
    color: var(--brass-bright);
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    color: var(--border-strong);
}

.breadcrumb [aria-current="page"] {
    color: var(--brass);
    font-weight: 500;
}

/* ---------- APK detail hero ---------- */

.apk-hero {
    position: relative;
    overflow: hidden;
    border-block: 1px solid var(--border);
    margin-top: 1.1rem;
    isolation: isolate;
}

.apk-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    filter: blur(42px) saturate(0.85);
    transform: scale(1.25);
}

.apk-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 9, 8, 0.88) 0%, rgba(10, 9, 8, 0.96) 100%);
}

.apk-hero-inner {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding-block: clamp(2.2rem, 6vw, 4rem);
}

.apk-hero-logo {
    width: clamp(132px, 18vw, 188px);
    height: clamp(132px, 18vw, 188px);
    flex-shrink: 0;
    border-radius: 1.4rem;
    object-fit: cover;
    border: 2px solid var(--border-strong);
    box-shadow: 0 0 0 6px rgba(200, 162, 74, 0.08), 0 20px 45px -18px rgba(0, 0, 0, 0.9);
}

.apk-hero-content {
    flex: 1;
    min-width: min(100%, 340px);
}

.apk-hero-content h1 {
    font-size: clamp(1.5rem, 3.4vw, 2.4rem);
    margin: 0.65rem 0 1.2rem;
}

.stat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.6rem;
    list-style: none;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(20, 17, 11, 0.85);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--heading);
}

.stat-chip svg {
    color: var(--brass);
    flex-shrink: 0;
}

.stat-chip .chip-label {
    color: var(--muted);
    font-size: 0.7rem;
}

.apk-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.version-badge {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
}

/* ---------- Detail layout: content + sidebar ---------- */

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding-block: var(--section-gap);
    align-items: start;
}

.article {
    max-width: 68ch;
}

.article h2 {
    font-size: clamp(1.35rem, 2.6vw, 1.7rem);
    margin: 2.6rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.article h3 {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    margin: 2rem 0 0.8rem;
    color: var(--brass-bright);
}

.article h2:first-child,
.article h3:first-child {
    margin-top: 0;
}

.article p {
    margin-bottom: 1rem;
    color: var(--text);
}

.article strong {
    color: var(--heading);
    font-weight: 600;
}

.article ul {
    margin: 0 0 1.2rem;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.article ul li {
    position: relative;
    padding-left: 1.6rem;
}

.article ul li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.62em;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 2px;
    background: linear-gradient(135deg, var(--brass-bright), var(--brass-deep));
    transform: rotate(45deg);
}

.article table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2rem;
    font-size: 0.92rem;
}

.article td,
.article th {
    border: 1px solid var(--border);
    padding: 0.6rem 0.8rem;
}

/* Sidebar */

.sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 1.2rem;
}

.side-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1.3rem;
}

.side-card-title {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 0.9rem;
}

.spec-list {
    list-style: none;
    display: grid;
}

.spec-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-block: 0.6rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.spec-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spec-list .spec-label {
    color: var(--muted);
}

.spec-list .spec-value {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--heading);
    text-align: right;
}

.side-warning {
    border-left: 4px solid var(--ember);
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.side-warning svg {
    color: var(--ember);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.side-warning p {
    font-size: 0.84rem;
    color: var(--muted);
}

/* Related grid: 5 desktop / 3 tablet / 2 mobile */

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* ---------- Static page hero ---------- */

.page-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    isolation: isolate;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: url('/assets/images/logo.webp');
    background-repeat: repeat;
    background-size: 130px;
    opacity: 0.5;
    filter: blur(26px) saturate(0.9);
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 9, 8, 0.9) 0%, rgba(10, 9, 8, 0.97) 100%);
}

.page-hero-inner {
    padding-block: clamp(2.5rem, 7vw, 4.5rem);
    max-width: 54rem;
}

.page-hero h1 {
    font-size: clamp(1.7rem, 3.8vw, 2.6rem);
    margin-top: 0.65rem;
}

.page-body {
    padding-block: var(--section-gap);
}

.page-body .article {
    margin-inline: auto;
}

/* ---------- Reveal animation ---------- */

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */

@media (min-width: 768px) {
    .apk-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.3rem;
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .apk-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .apk-grid-large {
        grid-template-columns: repeat(5, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1023px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-collage {
        transform: rotate(0deg);
        max-width: 30rem;
    }
}

@media (max-width: 860px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: fixed;
        top: 92px;
        left: 0;
        right: 0;
        background: rgba(10, 9, 8, 0.98);
        border-bottom: 1px solid var(--border);
        padding: 1rem clamp(1rem, 4vw, 2rem) 1.4rem;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    }

    body.nav-open .main-nav {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
    }

    .main-nav a {
        display: block;
        padding: 0.7rem 0.4rem;
        font-size: 1rem;
        min-height: 44px;
        border-bottom: 1px solid var(--border);
    }

    .main-nav a.active {
        border-bottom-color: var(--brass);
    }

    .nav-cta-item {
        margin-top: 0.8rem;
    }

    .main-nav .nav-cta {
        width: 100%;
        min-height: 44px;
    }

    .trust-grid {
        grid-template-columns: 1fr 1fr;
    }

    .warning-band {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .rule {
        width: 100%;
        flex: none;
        align-self: stretch;
    }
}

@media (max-width: 480px) {
    .apk-card-body {
        padding: 0.8rem;
    }

    .hero-stats {
        gap: 1.2rem;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
