/* ============================================================
   PAYGERFIE — Welcome Card overlay (V14.17)

   Editorial card that appears every time a customer lands on the
   homepage. Designed to feel like a magazine cover, not a modal.
   Tap anywhere to dismiss.

   Hooks (all admin-editable via WELCOME_CARD CMS section):
     [data-wc-icon]      ← optional small logo at top
     [data-wc-eyebrow]   ← small caps line
     [data-wc-title]     ← big serif headline
     [data-wc-subtitle]  ← italic supporting line
     [data-wc-body]      ← longer welcoming paragraph
     [data-wc-cta]       ← primary CTA button
     [data-wc-install]   ← "Install on home screen" prompt (PWA)
   ============================================================ */

.pg-welcome {
    position: fixed;
    inset: 0;
    z-index: 2147483600; /* above everything except true system overlays */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.pg-welcome[data-visible="1"] {
    opacity: 1;
    pointer-events: auto;
}

.pg-welcome-card {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow: hidden;
    border-radius: 4px;
    background: #fafaf8;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.05);
    transform: translateY(28px) scale(0.97);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s;
}
.pg-welcome[data-visible="1"] .pg-welcome-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ─── Background image (editorial top half) ─────────────────── */
.pg-welcome-media {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
}
.pg-welcome-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
}

/* Optional small brand mark over the image */
.pg-welcome-logo {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    max-height: 36px;
    max-width: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.4));
}

/* Close X — minimal, top right */
.pg-welcome-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0a;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.pg-welcome-close:hover { background: #fff; transform: scale(1.05); }

/* ─── Editorial body ─────────────────────────────────────────── */
.pg-welcome-body {
    padding: 36px 36px 32px;
    text-align: center;
    color: #0a0a0a;
}

.pg-welcome-eyebrow {
    display: block;
    font-size: 10px;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    font-weight: 500;
    color: #b88b48;       /* champagne accent */
    margin-bottom: 12px;
}

.pg-welcome-title {
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(34px, 6vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.5px;
    margin: 0 0 16px;
}

.pg-welcome-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 18px;
    line-height: 1.55;
    color: rgba(10, 10, 10, 0.75);
    margin: 0 0 18px;
}

.pg-welcome-body-text {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(10, 10, 10, 0.7);
    margin: 0 0 24px;
}

.pg-welcome-cta {
    display: inline-block;
    padding: 14px 28px;
    background: #0a0a0a;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border: 1px solid #0a0a0a;
    transition: background 0.3s, color 0.3s;
    margin-bottom: 22px;
}
.pg-welcome-cta:hover { background: transparent; color: #0a0a0a; }

/* ─── PWA install prompt (appears at the bottom of the card) ──── */
.pg-welcome-install {
    margin: 18px -36px -32px;
    padding: 16px 36px;
    background: rgba(10, 10, 10, 0.04);
    border-top: 1px solid rgba(10, 10, 10, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    color: rgba(10, 10, 10, 0.75);
    line-height: 1.45;
    text-align: left;
}
.pg-welcome-install svg {
    flex-shrink: 0;
    color: #0a0a0a;
    width: 22px;
    height: 22px;
}
.pg-welcome-install-btn {
    margin-left: auto;
    flex-shrink: 0;
    padding: 8px 14px;
    border: 1px solid #0a0a0a;
    background: #fff;
    color: #0a0a0a;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 100px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.pg-welcome-install-btn:hover { background: #0a0a0a; color: #fff; }

/* ─── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .pg-welcome { padding: 16px; }
    .pg-welcome-media { height: 180px; }
    .pg-welcome-body { padding: 28px 24px 26px; }
    .pg-welcome-title { font-size: 32px; }
    .pg-welcome-subtitle { font-size: 16px; }
    .pg-welcome-body-text { font-size: 13.5px; }
    .pg-welcome-install {
        margin: 18px -24px -26px;
        padding: 14px 24px;
        flex-wrap: wrap;
        font-size: 12px;
    }
    .pg-welcome-install-btn {
        width: 100%;
        margin-left: 0;
        margin-top: 6px;
        padding: 12px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pg-welcome,
    .pg-welcome-card {
        transition: opacity 0.2s !important;
        transform: none !important;
    }
}
