/* =================================================================
   Yahweh Has It — Prayer Requests
   Lightweight, reverent design system.
   Intentionally avoids: requestAnimationFrame loops, infinite
   animations on mobile, and backdrop-filter — these are the main
   causes of memory pressure / tab crashes on older phones.
   ================================================================= */

:root {
    /* Wine / burgundy depths */
    --wine-deep: #2c0e16;
    --wine-900: #45131f;
    --wine-800: #5c1a2b;
    --wine-700: #722f37;

    /* Sacred gold */
    --gold: #e6c173;
    --gold-bright: #f6dd9a;
    --gold-deep: #c49a4a;

    /* Light */
    --cream: #fcf4e4;
    --cream-dim: rgba(252, 244, 228, 0.74);
    --cream-faint: rgba(252, 244, 228, 0.5);
    --ivory: #fbf6ec;

    --hairline: rgba(230, 193, 115, 0.28);
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.38);

    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --maxw: 640px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Bulletproof base layer: if any gradient stop fails to paint on a
       device, the page is still wine — never a blank white/black band. */
    background-color: var(--wine-deep);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    /* NOTE: deliberately NO `background-attachment: fixed` — it is broken
       on iOS Safari and leaves blank bands on tall scrolling pages.
       px-sized halo stays near the cross; the wine vignette covers the
       whole page regardless of its height. */
    background-color: var(--wine-deep);
    background-image:
        radial-gradient(700px 460px at 50% 30px, rgba(246, 221, 154, 0.17), rgba(246, 221, 154, 0) 72%),
        radial-gradient(135% 100% at 50% 0%, var(--wine-800) 0%, var(--wine-900) 50%, var(--wine-deep) 100%);
    background-repeat: no-repeat;
    background-position: center top;
    /* iOS safe areas */
    padding:
        env(safe-area-inset-top)
        env(safe-area-inset-right)
        env(safe-area-inset-bottom)
        env(safe-area-inset-left);
}

/* Tap + focus polish */
a, button, input, textarea, select {
    -webkit-tap-highlight-color: rgba(230, 193, 115, 0.25);
}

:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 3px;
    border-radius: 4px;
}

/* =================================================================
   Layout
   ================================================================= */
.page {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(2rem, 7vw, 3.75rem) clamp(1.1rem, 5vw, 1.75rem) 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Gentle one-time entrance (respects reduced-motion below) */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.reveal.d1 { animation-delay: 0.05s; }
.reveal.d2 { animation-delay: 0.18s; }
.reveal.d3 { animation-delay: 0.32s; }
.reveal.d4 { animation-delay: 0.46s; }
.reveal.d5 { animation-delay: 0.6s; }

@keyframes rise {
    to { opacity: 1; transform: translateY(0); }
}

/* =================================================================
   Cross + halo (pure CSS, static glow — no JS, no loop)
   ================================================================= */
.cross-wrap {
    position: relative;
    width: 96px;
    height: 116px;
    margin-bottom: clamp(1.1rem, 3vw, 1.6rem);
    display: grid;
    place-items: center;
}

.halo {
    position: absolute;
    inset: -60px;
    background: radial-gradient(circle at 50% 42%, rgba(246, 221, 154, 0.32), rgba(246, 221, 154, 0) 62%);
    pointer-events: none;
}

.cross {
    position: relative;
    width: 46px;
    height: 116px;
}
.cross::before,
.cross::after {
    content: "";
    position: absolute;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--gold-bright), var(--gold) 50%, var(--gold-deep));
    box-shadow: 0 0 18px rgba(246, 221, 154, 0.45);
}
/* vertical beam */
.cross::before {
    left: 50%;
    top: 0;
    width: 11px;
    height: 100%;
    transform: translateX(-50%);
}
/* horizontal beam */
.cross::after {
    top: 30px;
    left: 0;
    width: 100%;
    height: 11px;
}

/* =================================================================
   Header type
   ================================================================= */
.site-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 10vw, 3.9rem);
    line-height: 1.05;
    letter-spacing: 0.01em;
    background: linear-gradient(180deg, #fff6e0 0%, var(--gold-bright) 42%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gold-bright); /* fallback */
    text-shadow: 0 2px 30px rgba(246, 221, 154, 0.18);
}

.eyebrow {
    margin-top: 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold);
}

.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin: 1.4rem 0 0.2rem;
    width: 100%;
    max-width: 280px;
    color: var(--gold-deep);
}
.ornament::before,
.ornament::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, var(--hairline), transparent);
}
.ornament span {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
}

.verse {
    margin-top: 1.5rem;
    max-width: 30rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.05rem, 4vw, 1.3rem);
    line-height: 1.5;
    color: var(--cream);
}
.verse cite {
    display: block;
    margin-top: 0.6rem;
    font-style: normal;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}

/* =================================================================
   Prayer form card (frames the GoHighLevel embed)
   ================================================================= */
.form-card {
    width: 100%;
    margin-top: clamp(1.5rem, 5vw, 2.4rem);
    background: transparent;
    overflow: hidden;
}

.form-card iframe {
    display: block;
    width: 100%;
    min-height: 520px;
    border: 0;
    background: transparent;
}

/* =================================================================
   Buttons
   ================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0.85rem 2rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-gold {
    color: var(--wine-900);
    background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 26px rgba(196, 154, 74, 0.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(196, 154, 74, 0.45); }
.btn-gold:active { transform: translateY(0); }

.btn-outline {
    color: var(--gold-bright);
    background: rgba(252, 244, 228, 0.04);
    border: 1px solid var(--hairline);
}
.btn-outline:hover {
    transform: translateY(-2px);
    background: rgba(252, 244, 228, 0.08);
    border-color: var(--gold);
}

.actions {
    margin-top: clamp(1.6rem, 4vw, 2.2rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    width: 100%;
}

.signature {
    margin-top: 2.4rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--cream-faint);
}

/* =================================================================
   Thank-you page
   ================================================================= */
.amen {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3.4rem, 16vw, 6rem);
    letter-spacing: 0.06em;
    line-height: 1;
    background: linear-gradient(180deg, #fff6e0 0%, var(--gold-bright) 45%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gold-bright);
    text-shadow: 0 2px 40px rgba(246, 221, 154, 0.22);
}

.received {
    margin-top: 1.1rem;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 6vw, 1.95rem);
    font-weight: 600;
    color: var(--cream);
}

.coverage {
    margin-top: 1.1rem;
    max-width: 34rem;
    font-size: 1.02rem;
    color: var(--cream-dim);
}

.home-link {
    align-self: flex-start;
    margin-bottom: 1.6rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.05rem;
}
.home-link a {
    color: var(--gold-bright);
    text-decoration: none;
}
.home-link a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Church flyer */
.flyer {
    width: 100%;
    margin-top: 0.6rem;
    border-radius: 16px;
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-soft);
    background: var(--ivory);
}

.link-row {
    margin-top: 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}
.text-link {
    color: var(--gold-bright);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 2px;
}
.text-link:hover { border-color: var(--gold); }

/* Vera's Facebook */
.fb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--cream-dim);
    text-decoration: none;
    font-size: 0.95rem;
    margin-top: 0.4rem;
}
.fb:hover { color: var(--gold-bright); }
.fb svg { width: 18px; height: 18px; }

.coming-soon {
    margin-top: 2rem;
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
}
.coming-soon small {
    display: block;
    margin-top: 0.3rem;
    letter-spacing: 0.12em;
    color: var(--cream-faint);
    text-transform: none;
}

.divider {
    width: 64px;
    height: 1px;
    margin: 2rem auto;
    background: linear-gradient(90deg, transparent, var(--hairline), transparent);
}

/* =================================================================
   Motion / accessibility safety
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
