:root {
    --pfm-blue: #075ec7;
    --pfm-blue-dark: #063f8f;
    --pfm-navy: #0d1b2e;
    --pfm-red: #ef2d2d;
    --pfm-text: #102033;
    --pfm-muted: #627087;
    --pfm-soft: #f4f8fd;
    --pfm-border: rgba(16, 32, 51, 0.09);
    --pfm-shadow: 0 18px 50px rgba(21, 47, 83, 0.10);
}

body.pf-mobile-landing-template {
    margin: 0;
    background: #fff;
}

body.pf-mobile-landing-template,
.pfm-landing {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--pfm-text);
}

.pfm-landing,
.pfm-landing * {
    box-sizing: border-box;
}

.pfm-landing {
    min-height: 100vh;
    overflow: hidden;
    background: #fff;
}

.pfm-landing button,
.pfm-landing a {
    -webkit-tap-highlight-color: transparent;
}

.pfm-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* Minimal PF header */
.pfm-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(15, 35, 60, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.admin-bar .pfm-header {
    top: 32px;
}

.pfm-header-inner {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.pfm-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.pfm-logo {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
}

.pfm-header-cta {
    appearance: none;
    -webkit-appearance: none;
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    background: var(--pfm-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.01em;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(7, 94, 199, 0.14);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.pfm-header-cta-icon {
    display: inline-flex;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    align-items: center;
    justify-content: center;
}

.pfm-header-cta-icon svg {
    display: block;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pfm-header-cta:hover,
.pfm-header-cta:focus-visible {
    transform: translateY(-1px);
    background: var(--pfm-blue-dark);
    box-shadow: 0 5px 14px rgba(7, 94, 199, 0.18);
}

/* Hero */
.pfm-hero {
    padding: 34px 0 24px;
    background:
        radial-gradient(circle at 12% 12%, rgba(7, 94, 199, 0.12), transparent 31%),
        radial-gradient(circle at 92% 22%, rgba(239, 45, 45, 0.08), transparent 25%),
        linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
}

.pfm-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(280px, 340px);
    gap: clamp(18px, 2.8vw, 34px);
    align-items: center;
    justify-content: center;
    max-width: 980px;
    margin: 0 auto;
}

.pfm-eyebrow,
.pfm-section-kicker,
.pfm-modal-kicker {
    margin: 0 0 12px;
    color: var(--pfm-blue);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.pfm-hero h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(42px, 5.2vw, 64px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 950;
    color: var(--pfm-navy);
}

.pfm-hero-description {
    max-width: 620px;
    margin: 16px 0 18px;
    color: var(--pfm-muted);
    font-size: 17px;
    line-height: 1.55;
}

.pfm-platform-note {
    margin: 8px 0 0;
    color: #7a879a;
    font-size: 13px;
}

.pfm-store-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.pfm-store-button {
    display: block;
    width: min(170px, 48%);
    max-width: 170px;
    line-height: 0;
    text-decoration: none;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .18s ease, opacity .18s ease;
}

.pfm-store-button:hover,
.pfm-store-button:focus-visible {
    transform: translateY(-2px);
    opacity: .93;
}

.pfm-store-button img {
    display: block;
    width: 100%;
    height: auto;
}

.pfm-hero-visual {
    width: 100%;
    max-width: 340px;
    justify-self: center;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
    background: transparent;
}

.pfm-hero-visual img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center top;
    border-radius: 34px;
    filter: drop-shadow(0 22px 52px rgba(0, 48, 117, .18));
}

/* Shared sections */
.pfm-events,
.pfm-how,
.pfm-final-cta {
    padding: 64px 0;
}

.pfm-events {
    background: #fff;
}

.pfm-how {
    background: var(--pfm-soft);
}

.pfm-section-heading {
    max-width: 740px;
    margin-bottom: 26px;
}

.pfm-section-heading-centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.pfm-section-heading h2,
.pfm-final-card h2 {
    margin: 0;
    font-size: clamp(34px, 4.8vw, 52px);
    line-height: 1.05;
    letter-spacing: -.045em;
    font-weight: 950;
    color: var(--pfm-navy);
}

.pfm-section-heading > p:last-child {
    margin: 12px 0 0;
    color: var(--pfm-muted);
    font-size: 17px;
    line-height: 1.6;
}

/* Event cards — 3.1.15 landing-page polish */
.pfm-event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
}

.pfm-event-card {
    appearance: none;
    width: 100%;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(16, 32, 51, .09);
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(21, 47, 83, .055);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.pfm-event-card:hover,
.pfm-event-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 9px 22px rgba(21, 47, 83, .085);
    border-color: rgba(7, 94, 199, .16);
    outline: none;
}

.pfm-event-media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #075ec7, #0d3b78);
}

.pfm-event-media > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.pfm-event-card:hover .pfm-event-media > img {
    transform: scale(1.012);
}

.pfm-event-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.pfm-event-placeholder img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 8px;
}

.pfm-event-body {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    padding: 16px 16px 14px;
}

.pfm-event-name {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--pfm-navy);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.28;
    letter-spacing: -.01em;
    font-weight: 700;
}

.pfm-event-meta-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 7px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(16, 32, 51, .075);
}

.pfm-event-date,
.pfm-event-joined,
.pfm-event-registration,
.pfm-event-action {
    min-width: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.3;
}

.pfm-event-date {
    color: #425066;
    font-weight: 600;
}

.pfm-event-registration {
    justify-self: end;
    color: #c44949;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.pfm-event-joined {
    color: #7b8798;
    font-weight: 500;
}

.pfm-event-action {
    justify-self: end;
    color: var(--pfm-blue);
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.pfm-empty-state {
    padding: 48px 24px;
    border: 1px dashed rgba(7, 94, 199, .22);
    border-radius: 24px;
    background: #f8fbff;
    text-align: center;
}

.pfm-empty-icon {
    display: block;
    margin-bottom: 10px;
    font-size: 34px;
}

.pfm-empty-state h3 {
    margin: 0;
    font-size: 22px;
    color: var(--pfm-navy);
}

.pfm-empty-state p {
    margin: 7px 0 0;
    color: var(--pfm-muted);
}

/* How it works */
.pfm-how-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.pfm-how-card {
    position: relative;
    padding: 28px;
    border: 1px solid rgba(16, 32, 51, .07);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(21, 47, 83, .05);
}

.pfm-how-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #eaf3ff;
    color: var(--pfm-blue);
}

.pfm-how-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pfm-how-number {
    position: absolute;
    top: 26px;
    right: 28px;
    color: rgba(7, 94, 199, .18);
    font-size: 44px;
    line-height: 1;
    font-weight: 950;
}

.pfm-how-card h3 {
    margin: 22px 0 8px;
    color: var(--pfm-navy);
    font-size: 20px;
    font-weight: 900;
}

.pfm-how-card p {
    margin: 0;
    color: var(--pfm-muted);
    font-size: 15px;
    line-height: 1.55;
}

/* Final CTA */
.pfm-final-cta {
    background: #fff;
}

.pfm-final-card {
    position: relative;
    overflow: hidden;
    padding: 58px 48px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 86% 20%, rgba(57, 149, 255, .36), transparent 28%),
        linear-gradient(135deg, #073d86 0%, #075ec7 58%, #0876e6 100%);
    color: #fff;
    text-align: center;
    box-shadow: 0 22px 55px rgba(7, 94, 199, .22);
}

.pfm-final-card .pfm-eyebrow {
    color: #bcdcff;
}

.pfm-final-card h2 {
    color: #fff;
}

.pfm-final-card > p:not(.pfm-eyebrow) {
    margin: 12px auto 24px;
    max-width: 560px;
    color: rgba(255,255,255,.84);
    font-size: 17px;
}

.pfm-store-buttons-final {
    justify-content: center;
}

/* Desktop-only footer; mobile toolbar is the mobile footer/navigation. */
.pfm-desktop-footer {
    padding: 0 0 34px;
    background: #fff;
}

.pfm-footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    color: #7a879a;
    font-size: 13px;
}

.pfm-footer-inner img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 8px;
}

.pfm-footer-inner a {
    color: var(--pfm-blue);
    font-weight: 800;
    text-decoration: none;
}

/* App modal */
body.pfm-modal-open {
    overflow: hidden;
}

.pfm-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    padding: 24px;
    overflow-y: auto;
}

.pfm-modal.is-open {
    display: block;
}

.pfm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 12, 25, .80);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.pfm-modal-panel {
    position: relative;
    z-index: 1;
    width: min(640px, calc(100vw - 32px));
    margin: 8vh auto;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 35px 90px rgba(0, 0, 0, .35);
}

.pfm-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0 0 3px;
    border: 0;
    border-radius: 50%;
    background: #eef3f9;
    color: #23344a;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.pfm-modal-content {
    padding: 38px;
    text-align: center;
}

.pfm-modal-content h2 {
    margin: 0;
    color: var(--pfm-navy);
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -.035em;
    font-weight: 950;
}

.pfm-modal-content > p:not(.pfm-modal-kicker) {
    max-width: 490px;
    margin: 12px auto 24px;
    color: var(--pfm-muted);
    font-size: 15px;
    line-height: 1.55;
}

.pfm-modal-grid {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding-top: 6px;
}

.pfm-modal-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 13px;
    border-radius: 18px;
    background: #f6f9fd;
}

.pfm-modal-qr img {
    width: 144px;
    height: 144px;
    display: block;
    border-radius: 10px;
}

.pfm-modal-qr strong {
    margin-top: 3px;
    color: var(--pfm-navy);
    font-size: 13px;
}

.pfm-modal-qr span {
    color: #7b8797;
    font-size: 11px;
}

.pfm-store-buttons-modal {
    display: grid;
    gap: 10px;
}

.pfm-store-buttons-modal .pfm-store-button {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
}

@media (max-width: 960px) {
    .pfm-hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
        gap: 24px;
    }

    .pfm-event-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    .admin-bar .pfm-header {
        top: 46px;
    }
}

@media (max-width: 760px) {
    body.pf-mobile-landing-template {
        padding-bottom: 0;
    }

    .pfm-landing {
        /* Leaves safe space for the separate PF mobile toolbar. */
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .pfm-container {
        width: min(100% - 28px, 640px);
    }

    .pfm-header {
        position: relative;
        top: auto !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .pfm-header-inner {
        min-height: 64px;
    }

    .pfm-logo {
        width: 42px;
        height: 42px;
    }

    .pfm-header-cta {
        min-height: 40px;
        padding: 0 14px;
        font-size: 14px;
    }

    @media (max-width: 360px) {
        .pfm-logo {
            width: 40px;
            height: 40px;
        }

        .pfm-header-cta {
            min-height: 38px;
            padding: 0 12px;
            gap: 6px;
            font-size: 13px;
        }

        .pfm-header-cta-icon,
        .pfm-header-cta-icon svg {
            width: 16px;
            height: 16px;
            flex-basis: 16px;
        }
    }

    .pfm-hero {
        padding: 42px 0 48px;
    }

    .pfm-hero-grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
        max-width: none;
    }

    .pfm-hero-copy {
        width: 100%;
        text-align: center;
    }

    .pfm-hero h1 {
        margin-left: auto;
        margin-right: auto;
        font-size: clamp(42px, 12vw, 60px);
    }

    .pfm-hero-description {
        margin: 18px auto 22px;
        font-size: 16px;
        line-height: 1.6;
    }

    .pfm-store-buttons-hero {
        justify-content: center;
    }

    .pfm-hero-visual {
        max-width: 360px;
        justify-self: auto;
    }

    .pfm-hero-visual img {
        border-radius: 26px;
    }

    .pfm-events,
    .pfm-how,
    .pfm-final-cta {
        padding: 56px 0;
    }

    .pfm-section-heading {
        margin-bottom: 26px;
        text-align: center;
    }

    .pfm-section-heading h2,
    .pfm-final-card h2 {
        font-size: 36px;
    }

    .pfm-section-heading > p:last-child {
        font-size: 15px;
    }

    .pfm-event-grid,
    .pfm-how-grid {
        grid-template-columns: 1fr;
    }

    .pfm-event-body {
        padding: 15px 15px 13px;
    }

    .pfm-event-name {
        min-height: 43px;
        font-size: 17px;
        line-height: 1.27;
    }

    .pfm-event-meta-grid {
        column-gap: 10px;
        row-gap: 7px;
        padding-top: 11px;
    }

    .pfm-event-date,
    .pfm-event-joined,
    .pfm-event-registration,
    .pfm-event-action {
        font-size: 12.5px;
    }

    .pfm-how-card {
        padding: 24px;
    }

    .pfm-how-number {
        top: 23px;
        right: 24px;
    }

    .pfm-final-card {
        padding: 42px 22px;
        border-radius: 24px;
    }

    .pfm-desktop-footer {
        display: none;
    }

    .pfm-modal {
        padding: 14px;
    }

    .pfm-modal-panel {
        margin: 8vh auto 20px;
        border-radius: 24px;
    }

    .pfm-modal-content {
        padding: 34px 22px 26px;
    }

    .pfm-modal-content h2 {
        font-size: 28px;
    }

    .pfm-modal-grid {
        display: block;
    }

    .pfm-modal-qr {
        display: none;
    }

    .pfm-store-buttons-modal {
        display: flex;
        justify-content: center;
        gap: 8px;
    }

    .pfm-store-buttons-modal .pfm-store-button {
        width: min(48%, 180px);
        margin: 0;
    }
}

@media (max-width: 380px) {
    .pfm-container {
        width: calc(100% - 22px);
    }

    /* 3.1.16: keep store badges side-by-side on narrow Fold/compact screens. */
    .pfm-store-buttons,
    .pfm-store-buttons-modal {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 7px;
        width: 100%;
    }

    .pfm-store-button,
    .pfm-store-buttons-modal .pfm-store-button {
        flex: 1 1 0;
        width: calc((100% - 7px) / 2);
        max-width: 158px;
        min-width: 0;
    }
}

@media (max-width: 320px) {
    .pfm-store-buttons,
    .pfm-store-buttons-modal {
        gap: 6px;
    }

    .pfm-store-button,
    .pfm-store-buttons-modal .pfm-store-button {
        width: calc((100% - 6px) / 2);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pfm-landing *,
    .pfm-landing *::before,
    .pfm-landing *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
