/* ============================================================
   Shared page components — currently the standard page hero.
   The same gradient-header treatment used across Leaderboard,
   Settings, and the info pages, extracted so new pages (home
   first) can reuse it instead of re-implementing.
   Uses the design tokens from style.css.
   ============================================================ */

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 0%, rgba(138, 99, 242, 0.5), transparent 45%),
        linear-gradient(135deg, #4a6ef5 0%, #2a3b6e 100%);
    color: #fff;
    border-radius: var(--radius-lg, 22px);
    padding: 1.9rem 2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 18px 44px rgba(42, 59, 110, 0.28);
}

.page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
}

.page-hero-grid.is-single {
    grid-template-columns: 1fr;
}

.page-hero .page-hero-title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.45rem, 3.4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #fff !important;
}

.page-hero .page-hero-sub {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.55;
    max-width: 32rem;
    color: rgba(255, 255, 255, 0.85) !important;
}

.page-hero .page-hero-sub a {
    color: #fff !important;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Auth buttons inherit .hero-auth-btn styling from the page; adapt the
   outline variant for the dark gradient background */
.page-hero .hero-signin {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
    box-shadow: none !important;
}

.page-hero .hero-signin:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #fff !important;
}

.page-hero .text-muted,
.page-hero small {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Beat base.css's dark-mode link recolor (its a:not(...) chain carries
   (0,5,1) specificity; these tie it and win by loading later) */
.dark-mode .page-hero a:not(.hero-auth-btn):not(._x):not(._y) {
    color: #fff !important;
}

.dark-mode .today-theme a.today-theme-edit:not(._x):not(._y) {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ---------- Today's theme card (home) ----------
   Standalone card, no full-width hero band behind it. */
.today-theme {
    max-width: 620px;
    margin: 0 auto 1.1rem;
    padding: 0.85rem 1.1rem 0.95rem;
    border-radius: 16px;
    text-align: center;
    background:
        radial-gradient(circle at 85% 0%, rgba(138, 99, 242, 0.55), transparent 55%),
        linear-gradient(135deg, #4a6ef5 0%, #2a3b6e 100%);
    box-shadow: 0 12px 30px rgba(42, 59, 110, 0.22);
}

.today-theme-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.today-theme .today-theme-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75) !important;
}

.today-theme .today-theme-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
}

.today-theme .today-theme-edit:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

.today-theme .today-theme-title {
    margin: 0.15rem 0 0;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    color: #fff !important;
}

.today-theme .today-theme-example {
    margin: 0.55rem 0 0;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
    background: rgba(17, 24, 39, 0.25);
    font-size: 0.87rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9) !important;
}

.today-theme .today-theme-example-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-bottom: 0.15rem;
}

@media (max-width: 576px) {
    .today-theme {
        border-radius: 14px;
        padding: 0.75rem 0.9rem 0.85rem;
    }
}

/* Visitor hero: center the pitch and auth buttons on all sizes */
.page-hero .page-hero-visitor {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.page-hero .page-hero-visitor .page-hero-sub {
    margin: 0 auto;
}

.page-hero .page-hero-visitor .d-flex {
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .page-hero-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }
}

@media (max-width: 576px) {
    .page-hero {
        padding: 1.4rem 1.15rem;
        border-radius: 18px;
    }

    .page-hero .page-hero-cta {
        width: 100%;
    }
}
