/* =========================
   PGM SAAS Theme (GHL)
   ========================= */

/* Tokens */
:root {
    --pgm-bg: #07090F;
    --pgm-bg2: #0C101B;
    --pgm-text: #fff;
    --pgm-muted: rgba(255,255,255,.72);
    --pgm-muted2: rgba(255,255,255,.55);
    --pgm-line: rgba(255,255,255,.10);
    --pgm-accent: #FF2D2D;
    --pgm-accent-deep: #B40000;
    --pgm-radius: 18px;
    --pgm-radius-lg: 28px;
    --pgm-shadow: 0 20px 60px rgba(0,0,0,.55);
    --pgm-shadow-soft: 0 10px 35px rgba(0,0,0,.35);
    /* RGB triplets for rgba() — update alongside --pgm-accent / --pgm-accent-deep when rebranding */
    --pgm-accent-rgb:      255,45,45;
    --pgm-accent-deep-rgb: 180,0,0;
}

/* Offset anchor jumps for sticky header + smooth scroll */
html {
    scroll-padding-top: 78px;
    scroll-behavior: smooth;
}

/* Page base */
body {
    background: linear-gradient(180deg, var(--pgm-bg) 0%, var(--pgm-bg2) 100%) !important;
    color: var(--pgm-text) !important;
}

/* Wrapper background + top glow */
#pgm-wrap {
    background: radial-gradient(1200px 700px at 15% -10%, rgba(var(--pgm-accent-rgb),.28), transparent 60%),
    radial-gradient(900px 600px at 85% 0%, rgba(var(--pgm-accent-rgb),.18), transparent 55%),
    radial-gradient(700px 500px at 50% 115%, rgba(255,255,255,.06), transparent 60%),
    var(--pgm-bg);
    color: var(--pgm-text);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    line-height: 1.55;
    font-size: 15px;
    background-size: 100% 2000px;
    background-repeat: no-repeat;
}

/* Make sizing predictable inside wrapper */
#pgm-wrap, #pgm-wrap * {
    box-sizing: border-box;
}

#pgm-wrap a {
    color: inherit;
    text-decoration: none;
}

#pgm-wrap a:hover {
    color: #fff;
}

/* Keyboard focus ring (accessibility) */
#pgm-wrap a:focus-visible,
#pgm-wrap .btn:focus-visible {
    outline: 2px solid var(--pgm-accent);
    outline-offset: 2px;
}

/* Extra insurance: add anchor offset via scroll-margin */
#pgm-wrap .section {
    scroll-margin-top: 78px;
}

#pgm-wrap .wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
#pgm-wrap .topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(7,9,15,.55);
    border-bottom: 1px solid var(--pgm-line);
}

#pgm-wrap .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 14px;
}

#pgm-wrap .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

#pgm-wrap .logo {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pgm-accent), var(--pgm-accent-deep));
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 10px 30px rgba(var(--pgm-accent-rgb),.22);
}

#pgm-wrap .navlinks {
    display: flex;
    gap: 18px;
    align-items: center;
    color: var(--pgm-muted);
    font-size: 14px;
}

#pgm-wrap .navlinks a:hover {
    color: #fff;
}

#pgm-wrap .actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons */
#pgm-wrap .btn {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.04);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, filter .18s ease, box-shadow .18s ease, border-color .18s ease;
    white-space: nowrap;
}

#pgm-wrap .btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.06);
}

#pgm-wrap .btn.primary {
    background: linear-gradient(135deg, var(--pgm-accent), var(--pgm-accent-deep));
    border: 1px solid rgba(var(--pgm-accent-rgb),.55);
    box-shadow: 0 18px 50px rgba(var(--pgm-accent-rgb),.20);
}

#pgm-wrap .btn.primary:hover {
    filter: brightness(1.05);
}

#pgm-wrap .btn.ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,.16);
    color: var(--pgm-muted);
}

/* Hero + sections */
#pgm-wrap .hero {
    padding: 70px 0 36px;
}

#pgm-wrap .hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 22px;
    align-items: stretch;
}

#pgm-wrap .badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.03);
    color: var(--pgm-muted);
    font-size: 13px;
    transition: border-color .2s ease;
}

#pgm-wrap .badge:hover {
    border-color: rgba(255,255,255,.22);
}

#pgm-wrap .dot {
    width: 9px;
    height: 9px;
    border-radius: 99px;
    background: var(--pgm-accent);
    box-shadow: 0 0 0 6px rgba(var(--pgm-accent-rgb),.16);
}

#pgm-wrap h1 {
    margin: 14px 0 10px;
    font-size: clamp(34px, 4.2vw, 54px);
    line-height: 1.05;
    letter-spacing: -.8px;
}

#pgm-wrap .sub {
    color: var(--pgm-muted);
    font-size: 18px;
    max-width: 52ch;
}

#pgm-wrap .hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* --- HERO RIGHT CARD (boxed “What happens…” panel) --- */
#pgm-wrap .hero-card {
    border-radius: var(--pgm-radius-lg);
    border: 1px solid rgba(255,255,255,.10);
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    box-shadow: var(--pgm-shadow);
    overflow: hidden;
    position: relative;
}

#pgm-wrap .hero-card::after {
    content: "";
    position: absolute;
    inset: -2px;
    background: radial-gradient(700px 340px at 60% -10%, rgba(var(--pgm-accent-rgb),.20), transparent 55%);
    pointer-events: none;
}

#pgm-wrap .hero-card .cardpad {
    position: relative;
    padding: 18px 18px 16px;
}

#pgm-wrap .mini-title {
    color: var(--pgm-muted);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .35px;
    text-transform: uppercase;
}

#pgm-wrap .stat {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

#pgm-wrap .statbox {
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(7,9,15,.55);
    border-radius: var(--pgm-radius);
    padding: 12px;
}

#pgm-wrap .statbox b {
    display: block;
    font-size: 16px;
    color: #fff;
}

#pgm-wrap .statbox small {
    color: var(--pgm-muted2);
}

#pgm-wrap .bar {
    height: 10px;
    border-radius: 999px;
    margin-top: 10px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    overflow: hidden;
}

#pgm-wrap .fill {
    height: 100%;
    width: 72%;
    background: linear-gradient(90deg, var(--pgm-accent), rgba(var(--pgm-accent-rgb),.55));
}

#pgm-wrap .micro {
    margin-top: 12px;
    color: var(--pgm-muted2);
    font-size: 12px;
}

/* Sections */
#pgm-wrap .section {
    padding: 34px 0;
}

#pgm-wrap .section--alt {
    background: rgba(255,255,255,.015);
}

#pgm-wrap p {
    margin: 0 0 12px;
}

#pgm-wrap .section h2 {
    margin: 0 0 10px;
    font-size: 26px;
    letter-spacing: -.4px;
}

#pgm-wrap .section .lead {
    margin: 0 0 18px;
    color: var(--pgm-muted);
    max-width: 70ch;
}

/* Grids */
#pgm-wrap .grid-4 {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
}

#pgm-wrap .grid-3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 14px;
}

#pgm-wrap .grid-2 {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 14px;
}

/* Cards */
#pgm-wrap .card {
    border-radius: var(--pgm-radius-lg);
    border: 1px solid rgba(255,255,255,.10);
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    padding: 16px;
    box-shadow: var(--pgm-shadow-soft);
    transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}

#pgm-wrap .card:hover {
    border-color: rgba(255,255,255,.18);
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0,0,0,.45);
}

#pgm-wrap .icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(var(--pgm-accent-rgb),.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    margin-bottom: 10px;
}

/* Pricing spacing (button too close to text) */
#pgm-wrap #pricing .card p {
    margin: 10px 0 14px;
}

#pgm-wrap #pricing .card .btn {
    margin-top: 10px;
}

/* Optional price line helper */
#pgm-wrap .price-line {
    margin: 10px 0 14px;
    color: rgba(255,255,255,.85);
    font-size: 20px;
}

#pgm-wrap .price-line b {
    font-size: 28px;
}

/* Footer */
#pgm-wrap footer {
    padding: 26px 0 46px;
    border-top: 1px solid var(--pgm-line);
    color: rgba(255,255,255,.55);
    font-size: 13px;
}

/* Legal page tweaks only */
#pgm-wrap.pgm-legal .card {
    padding: 22px;
}

#pgm-wrap.pgm-legal .card p,
#pgm-wrap.pgm-legal .card li {
    line-height: 1.65;
}

#pgm-wrap.pgm-legal .card h2,
#pgm-wrap.pgm-legal .card h3 {
    margin-top: 18px;
}

/* Responsive */
@media (max-width: 980px) {
    #pgm-wrap .hero-grid {
        grid-template-columns: 1fr;
    }

    #pgm-wrap .grid-4 {
        grid-template-columns: repeat(2,1fr);
    }

    #pgm-wrap .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    #pgm-wrap .navlinks {
        display: none;
    }

    #pgm-wrap .grid-4, #pgm-wrap .grid-2 {
        grid-template-columns: 1fr;
    }

    #pgm-wrap .hero {
        padding-top: 56px;
    }
}
