/* =====================================================================
   Hresh.com Homepage
   - Preserves left sidebar (#menu-container-main) + Footer template feel.
   - Adds polished dark top nav, hero with trailer, scrollable sections.
   ===================================================================== */

:root {
    --hresh-bg: #fcfdf5;
    --hresh-surface: #ffffff;
    --hresh-surface-2: #f3f1e7;
    --hresh-ink: #1a1d20;
    --hresh-ink-2: #3a3f45;
    --hresh-mute: #6a7079;
    --hresh-line: #e6e3d6;
    --hresh-dark: #28282B;
    --hresh-dark-2: #1f1f22;
    --hresh-accent: #c9a64a;       /* hresh gold */
    --hresh-accent-2: #e2c168;
    --hresh-accent-ink: #1a1300;
    --hresh-blue: #003747;
    --hresh-radius: 14px;
    --hresh-radius-sm: 10px;
    --hresh-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    --hresh-shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.18);
    --hresh-maxw: 1280px;
    --hresh-section-pad: clamp(48px, 6vw, 96px);
    --hresh-topnav-h: 64px;
}

/* Page chrome overrides --------------------------------------------- */
#home-container { background-color: var(--hresh-bg); }

#main {
    /* The global rule sets justify-content: end; we want top-down flow */
    justify-content: flex-start !important;
    min-width: 0;
}

.hresh-com-main {
    flex: 1 1 auto;
    width: 100%;
    color: var(--hresh-ink);
    overflow: auto;
}

.hresh-com-main img { max-width: 100%; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; }
.hresh-com-main p { color: var(--hresh-ink-2); margin: 0 0 12px; }
.hresh-com-main h2,
.hresh-com-main h3,
.hresh-com-main h4 { color: var(--hresh-ink); margin: 0 0 12px; line-height: 1.2; }
.hresh-com-main a { color: var(--hresh-blue); }

/* Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--hresh-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--hresh-accent-2); outline-offset: 2px; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }

.btn-primary {
    background: var(--hresh-accent);
    color: var(--hresh-accent-ink);
    border-color: var(--hresh-accent);
    box-shadow: 0 6px 18px rgba(201, 166, 74, 0.35);
}
.btn-primary:hover { background: var(--hresh-accent-2); transform: translateY(-1px); }

.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

.hresh-com-main .btn-secondary {
    color: var(--hresh-ink);
    border-color: var(--hresh-ink);
}
.hresh-com-main .btn-secondary:hover { background: var(--hresh-ink); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--hresh-ink);
    border-color: var(--hresh-line);
}
.btn-ghost:hover { background: var(--hresh-surface-2); }

/* Top Navigation ----------------------------------------------------- */
.top-nav-wrap {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--hresh-dark);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.top-nav-inner {
    max-width: var(--hresh-maxw);
    margin: 0 auto;
    height: var(--hresh-topnav-h);
    padding: 0 clamp(16px, 3vw, 28px) 0 clamp(8px, 1.2vw, 14px);
    display: flex;
    align-items: center;
    gap: 18px;
}
.top-nav-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex: 0 0 auto; }
.top-nav-brand-hresh { margin-left: 4px; }
/* Float GG mark to the far left edge of the header, independent of the centered inner wrap. */
.top-nav-brand-gg {
    position: absolute;
    left: clamp(8px, 1.2vw, 14px);
    top: 50%;
    transform: translateY(-50%);
}
.top-nav-logo {
    height: 30px;
    width: auto;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.4));
}
.top-nav-logo-hresh { height: 26px; image-rendering: pixelated; }
.top-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 18px;
    flex: 1 1 auto;
}
.top-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.top-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.top-nav-ctas { display: flex; gap: 10px; align-items: center; }

.top-nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    margin-left: auto;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}
.top-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

/* Sections ----------------------------------------------------------- */
.hresh-section {
    max-width: var(--hresh-maxw);
    margin: 0 auto;
    padding: var(--hresh-section-pad) clamp(16px, 3vw, 32px);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}
.hresh-section.is-visible { opacity: 1; transform: none; }

.section-head { max-width: 820px; margin: 0 auto 36px; text-align: center; }
.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--hresh-accent);
    margin: 0 0 8px;
}
.hresh-section h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}
.section-lede { font-size: 1.05rem; color: var(--hresh-ink-2); }

.card {
    background: var(--hresh-surface);
    border: 1px solid var(--hresh-line);
    border-radius: var(--hresh-radius);
    box-shadow: var(--hresh-shadow);
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--hresh-shadow-lg); border-color: #d8d3bf; }

/* Hero --------------------------------------------------------------- */
.hero {
    padding-top: clamp(28px, 4vw, 56px);
    padding-bottom: clamp(40px, 5vw, 72px);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 48px);
    align-items: center;
}
.hero-video-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    border-radius: var(--hresh-radius);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    max-width: 1280px;
    margin-inline: auto;
    box-shadow: var(--hresh-shadow-lg);
    border: 1px solid var(--hresh-line);
}
.hero-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
    border: 0;
}
.hero-video-shadow {
    position: absolute;
    inset: auto -10% -20px -10%;
    height: 60px;
    background: radial-gradient(60% 100% at 50% 0%, rgba(0, 0, 0, 0.25), transparent);
    z-index: -1;
    pointer-events: none;
}

.hero-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hero-logo { height: 56px; width: auto; align-self: flex-start; }
.hero-title {
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 4px 0 0;
}
.hero-lede { font-size: 1.05rem; color: var(--hresh-ink-2); margin: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.hero-badges {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.hero-badges li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--hresh-ink-2);
    background: var(--hresh-surface);
    border: 1px solid var(--hresh-line);
    border-radius: 999px;
    padding: 6px 12px;
}
.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hresh-accent);
    box-shadow: 0 0 0 3px rgba(201, 166, 74, 0.18);
}

/* Loop --------------------------------------------------------------- */
.loop-grid,
.modes-grid,
.craft-grid,
.market-grid,
.lb-grid,
.community-grid {
    display: grid;
    gap: 18px;
}
.loop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.loop-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.loop-card-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: var(--hresh-surface-2);
    border-radius: 10px;
    padding: 8px;
}

/* Modes -------------------------------------------------------------- */
.modes-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mode-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; position: relative; }
.mode-card img { width: 56px; height: 56px; object-fit: contain; }
.mode-card h3 { font-size: 1.05rem; }
.mode-card-soon { background: linear-gradient(180deg, var(--hresh-surface) 0%, var(--hresh-surface-2) 100%); }
.pill {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--hresh-accent);
    color: var(--hresh-accent-ink);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Progression / wave track ------------------------------------------ */
.wave-track {
    list-style: none;
    margin: 0;
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    background: var(--hresh-surface);
    border: 1px solid var(--hresh-line);
    border-radius: var(--hresh-radius);
    box-shadow: var(--hresh-shadow);
    position: relative;
}
.wave-track::before {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--hresh-line) 0 8px,
        transparent 8px 16px
    );
    border-radius: 2px;
    z-index: 0;
}
.wave-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    text-align: center;
}
.wave-step img { width: 64px; height: 64px; object-fit: contain; background: var(--hresh-surface-2); border-radius: 12px; padding: 8px; }
.wave-num {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--hresh-accent);
}
.wave-label { font-size: 0.85rem; color: var(--hresh-ink-2); }
.wave-step-final img { background: linear-gradient(135deg, #fff5cc, #f5d36a); }

/* Craft -------------------------------------------------------------- */
.craft-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.craft-card { display: flex; flex-direction: column; gap: 10px; }
.craft-card-art {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    background: var(--hresh-surface-2);
    border-radius: 12px;
    padding: 0;
    display: block;
}
.chip-row { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row li {
    width: 44px;
    height: 44px;
    background: var(--hresh-surface-2);
    border: 1px solid var(--hresh-line);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chip-row img { width: 32px; height: 32px; object-fit: contain; }

/* Marketplace -------------------------------------------------------- */
.market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.market-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.market-card img { width: 48px; height: 48px; object-fit: contain; }

/* Battle Pass -------------------------------------------------------- */
.pass-layout { display: grid; grid-template-columns: minmax(0, 560px) minmax(280px, 1fr); gap: 24px; align-items: start; }

/* Mock that mirrors the real BattlePass page look (compact for marketing) */
.bp-mock {
    padding: 14px 14px 12px;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.bp-mock-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--hresh-line);
    margin-bottom: 12px;
}
.bp-mock-title { margin: 0; font-size: 1.05rem; }
.bp-mock-sub { margin: 2px 0 0; color: var(--hresh-ink-2); font-size: 0.85rem; }
.bp-mock-points { min-width: 200px; }
.bp-mock-points-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--hresh-mute);
    margin-bottom: 6px;
}
.bp-mock-points-label { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.bp-mock-points-val { font-weight: 800; color: var(--hresh-ink); }
.bp-mock-bar {
    height: 6px;
    background: var(--hresh-surface-2);
    border: 1px solid var(--hresh-line);
    border-radius: 999px;
    overflow: hidden;
}
.bp-mock-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--hresh-accent-2, #c9a64a), #ffd76b);
    border-radius: 999px;
}

/* Shaded board container — mirrors `.pass-board` from real /pass page */
.bp-mock-board {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 12px;
}
.bp-mock-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 100%;
}

/* Tile = real `.reward-tile`: dark grey rounded panel, square */
.bp-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
.bp-icon {
    max-width: 78%;
    max-height: 78%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    position: relative;
    z-index: 1;
}
/* Tile id: small white number bottom-center inside tile (matches in-game) */
.bp-id {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.02em;
    z-index: 2;
    pointer-events: none;
}
/* Quantity chip — dark rounded badge, like real `.quantity-badge` */
.bp-qty {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    padding: 1px 6px;
    z-index: 4;
    line-height: 1.2;
}

/* Locked: dim icon + dark overlay + large centered lock (mirrors real BP) */
.bp-tile.is-locked { background: rgba(0, 0, 0, 0.28); }
.bp-tile.is-locked .bp-icon { opacity: 0.55; filter: grayscale(0.4); }
.bp-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
}
.bp-lock {
    width: 42%;
    height: 42%;
    object-fit: contain;
    opacity: 0.95;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Premium tier accent — gold-tinted background */
.bp-tile.is-premium {
    background: linear-gradient(160deg, #3a2a08, #5a4416);
}
.bp-tile.is-premium.is-locked .bp-icon { opacity: 0.65; filter: grayscale(0.2); }

/* Claimed: green check overlay + slightly desaturated */
.bp-tile.is-claimed { background: rgba(56, 142, 60, 0.18); }
.bp-tile.is-claimed .bp-icon { opacity: 0.75; }
.bp-claimed-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}
.bp-check {
    width: 50%;
    height: 50%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

/* Claimable: rotating gold ring (mirrors BattlePassPage) */
.bp-tile.is-claimable::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #ffefad 0%,
        #ffefad 48%,
        #f6d97a 50%,
        #ddaf37 82%,
        #f6d97a 88%,
        #ffefad 100%
    );
    -webkit-mask: radial-gradient(
        farthest-side,
        transparent calc(100% - 3.2px),
        rgba(0,0,0,0.45) calc(100% - 2.6px),
        rgba(0,0,0,0.85) calc(100% - 2.1px),
        #000 calc(100% - 2px),
        #000 100%
    );
            mask: radial-gradient(
        farthest-side,
        transparent calc(100% - 3.2px),
        rgba(0,0,0,0.45) calc(100% - 2.6px),
        rgba(0,0,0,0.85) calc(100% - 2.1px),
        #000 calc(100% - 2px),
        #000 100%
    );
    animation: bp-spin-ring 5s linear infinite;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}
@keyframes bp-spin-ring { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .bp-tile.is-claimable::before { animation: none; }
}

.bp-mock-foot {
    margin: 10px 0 0;
    text-align: center;
    color: var(--hresh-mute);
    font-size: 0.78rem;
}

.store-row { display: grid; grid-template-columns: 1fr; gap: 12px; align-content: start; }
.store-card { display: grid; grid-template-columns: 84px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 4px; align-items: start; padding: 14px 16px; }
.store-card img { grid-column: 1; grid-row: 1 / span 2; align-self: start; width: 84px; height: 84px; object-fit: contain; background: var(--hresh-surface-2); border-radius: 10px; padding: 6px; }
.store-card h4 { grid-column: 2; grid-row: 1; margin: 0; align-self: start; line-height: 1.2; }
.store-card p { grid-column: 2; grid-row: 2; margin: 0; font-size: 0.9rem; align-self: start; line-height: 1.4; }

/* Leaderboards ------------------------------------------------------- */
.lb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lb-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lb-card-head img { width: 36px; height: 36px; }
.lb-card-head h3 { margin: 0; font-size: 1.05rem; }
.lb-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.lb-table th,
.lb-table td { text-align: left; padding: 8px 6px; border-bottom: 1px dashed var(--hresh-line); }
.lb-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--hresh-mute); font-weight: 700; }
.lb-table tbody tr:last-child td { border-bottom: none; }
.lb-table td:first-child { font-weight: 800; color: var(--hresh-accent); width: 32px; }

/* Community ---------------------------------------------------------- */
.community-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.community-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}
.community-card img { width: 44px; height: 44px; }
.community-card h3 { margin: 0; font-size: 1.02rem; }
.community-card p { color: var(--hresh-ink-2); font-size: 0.92rem; margin: 0; }
button.community-card {
    font: inherit;
    text-align: left;
    background: var(--hresh-bg-card, #fff);
    border: 1px solid var(--hresh-line);
    cursor: pointer;
    width: 100%;
}
a.community-card { display: flex; }
a.community-card:hover,
button.community-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hresh-shadow-lg);
    border-color: var(--hresh-accent);
}

/* Social popup ------------------------------------------------------- */
.social-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.social-popup[hidden] { display: none; }
.social-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.72);
    backdrop-filter: blur(4px);
    animation: socialFadeIn 0.18s ease;
}
.social-popup-panel {
    position: relative;
    background: #1f1f22;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--hresh-radius);
    box-shadow: var(--hresh-shadow-lg);
    width: min(560px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 28px clamp(20px, 3vw, 32px) 24px;
    animation: socialSlideUp 0.22s ease;
}
.social-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}
.social-popup-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.social-popup-title {
    margin: 0 0 6px;
    font-size: 1.4rem;
    color: #fff;
}
.social-popup-lede {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
}
.social-popup-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.social-popup-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.social-popup-item:hover,
.social-popup-item:focus-visible {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    outline: none;
}
.social-popup-icon {
    grid-row: 1 / span 2;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}
.social-popup-discord .social-popup-icon { color: #5865F2; }
.social-popup-x .social-popup-icon { color: #ffffff; }
.social-popup-youtube .social-popup-icon { color: #ff0033; }
.social-popup-twitch .social-popup-icon { color: #9146ff; }
.social-popup-instagram .social-popup-icon { color: #e1306c; }
.social-popup-patreon .social-popup-icon { color: #ff424d; }
.social-popup-label { font-weight: 700; font-size: 0.98rem; line-height: 1.2; }
.social-popup-sub { color: rgba(255, 255, 255, 0.65); font-size: 0.82rem; }

body.social-popup-open { overflow: hidden; }

@keyframes socialFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes socialSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .social-popup-backdrop,
    .social-popup-panel { animation: none; }
}
@media (max-width: 600px) {
    .social-popup-list { grid-template-columns: 1fr; }
}

/* Final CTA ---------------------------------------------------------- */
.section-final {
    margin-top: 24px;
}
.final-inner {
    background: linear-gradient(135deg, #1f1f22 0%, #28282B 50%, #3a2f0e 100%);
    color: #fff;
    border-radius: var(--hresh-radius);
    padding: clamp(28px, 4vw, 56px);
    display: grid;
    grid-template-columns: minmax(120px, 220px) 1fr;
    gap: clamp(20px, 3vw, 40px);
    align-items: center;
    box-shadow: var(--hresh-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}
.final-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(201, 166, 74, 0.18), transparent 40%),
        radial-gradient(circle at 90% 100%, rgba(201, 166, 74, 0.12), transparent 50%);
    pointer-events: none;
}
.final-art {
    width: 100%;
    max-width: 200px;
    image-rendering: pixelated;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    justify-self: center;
    position: relative;
    z-index: 1;
}
.final-copy { position: relative; z-index: 1; }
.final-copy h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 10px; }
.final-copy p { color: rgba(255, 255, 255, 0.85); font-size: 1.05rem; margin: 0 0 18px; }
.final-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.final-copy .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.final-copy .btn-secondary:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; color: #fff; }

/* Responsive --------------------------------------------------------- */
/*@media (max-width: 1100px) {*/
/*    .hero-grid { grid-template-columns: 1fr; }*/
/*    .loop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }*/
/*    .modes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }*/
/*    .craft-grid { grid-template-columns: 1fr; }*/
/*    .market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }*/
/*    .pass-layout { grid-template-columns: 1fr; }*/
/*    .bp-mock-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }*/
/*    .bp-mock-header { grid-template-columns: 1fr; }*/
/*    .bp-mock-points { min-width: 0; }*/
/*    .lb-grid { grid-template-columns: 1fr; }*/
/*    .community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }*/
/*    .wave-track { grid-template-columns: repeat(5, minmax(0, 1fr)); }*/
/*}*/

@media (max-width: 1699px) {
    .top-nav-brand-gg { display: none; }
}

@media (max-width: 1099px) {
    .top-nav-toggle { display: inline-flex; }
    .top-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: var(--hresh-topnav-h);
        background: var(--hresh-dark-2);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 8px 12px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .top-nav.is-open { max-height: 400px; padding: 8px 12px 12px; }
    .top-nav a { padding: 12px 14px; }
    .top-nav-ctas .btn-secondary { display: none; }

    .hero-grid { grid-template-columns: 1fr; }
    .craft-grid { grid-template-columns: 1fr; }
    .pass-layout { grid-template-columns: 1fr; }
    .lb-grid { grid-template-columns: 1fr; }

    .modes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .modes-grid .mode-card-soon { grid-column: span 2; }
    .wave-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .wave-track::before { display: none; }
    .bp-mock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .final-inner { grid-template-columns: 1fr; text-align: center; }
    .final-copy { text-align: center; }
    .final-ctas { justify-content: center; }

    .hero-logo { height: 44px; }
}

@media (max-width: 520px) {
    .loop-grid,
    .modes-grid,
    .market-grid,
    .community-grid { grid-template-columns: 1fr; }
    .modes-grid .mode-card-soon { grid-column: auto; }
    .top-nav-logo { height: 24px; }
    .top-nav-logo-hresh { height: 22px; }
    .hero-badges li { font-size: 0.8rem; padding: 5px 10px; }
}

/* Trailer modal ------------------------------------------------------ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.trailer-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2vw, 24px);
}
.trailer-modal[hidden] { display: none; }
.trailer-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.trailer-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1280px, 96vw);
    max-height: calc(100vh - 32px);
    aspect-ratio: 16 / 9;
    max-width: calc((100vh - 32px) * (16 / 9));
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
    animation: trailer-modal-in 0.18s ease-out both;
}
.trailer-modal-frame {
    width: 100%;
    height: 100%;
    background: #000;
}
.trailer-modal-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
    border: 0;
}
.trailer-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    cursor: pointer;
    z-index: 2;
    transition: background 0.15s ease, transform 0.15s ease;
    padding: 0;
}
.trailer-modal-close:hover,
.trailer-modal-close:focus-visible {
    background: rgba(0, 0, 0, 0.85);
    border-color: #fff;
    transform: scale(1.05);
    outline: none;
}
body.trailer-modal-open { overflow: hidden; }

@keyframes trailer-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Phone landscape: let dialog fill more aggressively */
@media (max-height: 480px) {
    .trailer-modal { padding: 4px; }
    .trailer-modal-dialog {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hresh-section { opacity: 1; transform: none; transition: none; }
    .card,
    .btn { transition: none; }
    .card:hover,
    .btn-primary:hover { transform: none; }
    .trailer-modal-dialog { animation: none; }
}

#footer p {
    margin: 0;
}
