/* Blessed Mothers — warm plum & gold, matched to the logo; mobile-first */
:root {
    --plum: #9e4e82;
    --plum-dark: #7a3a64;
    --plum-deep: #5e2c4d;
    /* Component form, for rgba() overlays — rgba() can't take a hex var. */
    --plum-rgb: 158, 78, 130;
    --plum-deep-rgb: 94, 44, 77;
    --gold: #efb63b;
    --gold-soft: #f6cf7d;
    --coral: #ef6f6b;
    --cream: #fdf8f5;
    --ink: #3a2f36;
    --muted: #7d6c76;
    --green: #3f7d4e;
    --border: #ecdde6;
}

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

body {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    /* Sticky footer: main absorbs the slack so short pages still push it down. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh; /* accounts for mobile browser chrome */
}

main { flex: 1 0 auto; }

/* Opt-in on short pages (thank-you, 404) to center content in the leftover space. */
main.main-centered { display: flex; align-items: center; justify-content: center; }
main.main-centered > .container { width: 100%; }

/* Data tables need more room than the 860px reading width for prose. */
main.main-wide .container { max-width: 1200px; }

.container { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header { background: var(--plum); }
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.25rem; flex-wrap: wrap; gap: 0.5rem;
}
.brand {
    color: #fff; text-decoration: none; font-size: 1.3rem; font-weight: bold;
    display: flex; align-items: center; gap: 0.6rem;
}
.brand img { height: 2.4rem; width: 2.4rem; border-radius: 50%; background: #fff; }
.site-header nav { display: flex; gap: 1rem; align-items: center; }
.site-header nav a { color: #f5e6ef; text-decoration: none; }
.site-header nav a:hover { color: #fff; text-decoration: underline; }
.nav-cta {
    background: var(--gold); color: var(--plum-deep) !important;
    padding: 0.4rem 0.9rem; border-radius: 4px; font-weight: bold;
}
.nav-cta:hover { text-decoration: none !important; filter: brightness(1.05); }

/* Hero */
.hero {
    /* The photo sits beneath the brand gradient. It is a very light image, so the
       overlay stays opaque enough that white text keeps its contrast over it. */
    background-color: var(--plum-dark); /* holds the colour while the photo loads */
    background-image:
        linear-gradient(180deg, rgba(var(--plum-rgb), 0.78) 0%, rgba(var(--plum-deep-rgb), 0.9) 100%),
        /* Neutral scrim under the plum: the photo's whites are bright enough to
           wash out white text, and darkening them first keeps the purple rich
           instead of forcing a near-opaque overlay that hides the photo. */
        linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)),
        url('/image/hero-960.jpg');
    background-position: center 40%; /* keeps the baby's face in frame when cropped */
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
    padding: 3rem 1rem 3.5rem;
}
/* Larger screens get the wider file; phones never download it. */
@media (min-width: 768px) {
    .hero {
        background-image:
            linear-gradient(180deg, rgba(var(--plum-rgb), 0.78) 0%, rgba(var(--plum-deep-rgb), 0.9) 100%),
            linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)),
            url('/image/hero-1920.jpg');
    }
}
.hero h1, .hero p.lead, .hero .scripture { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.hero .hero-logo { height: 9rem; width: 9rem; border-radius: 50%; background: #fff; margin-bottom: 1.25rem; box-shadow: 0 4px 18px rgba(0,0,0,0.18); }
.hero h1 { font-size: 2.2rem; margin-bottom: 0.75rem; }
.hero p.lead { font-size: 1.2rem; max-width: 40rem; margin: 0 auto 1.5rem; color: #f5e6ef; }
.hero .scripture { font-style: italic; color: var(--gold-soft); margin-bottom: 1.5rem; }

.btn {
    display: inline-block; background: var(--gold); color: var(--plum-deep);
    font-weight: bold; text-decoration: none; padding: 0.75rem 1.75rem;
    border-radius: 4px; border: none; font-size: 1.05rem; font-family: inherit; cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }
.btn-primary { background: var(--plum); color: #fff; }

/* Sections */
section.page-section { padding: 2.5rem 0; }
section.page-section + section.page-section { border-top: 1px solid var(--border); }
section h2 { color: var(--plum-dark); margin-bottom: 0.75rem; font-size: 1.5rem; }
section p + p { margin-top: 0.75rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem; border-top: 3px solid var(--gold); }
.card h3 { color: var(--plum); margin-bottom: 0.4rem; font-size: 1.1rem; }
ul.check { list-style: none; margin-top: 0.75rem; }
ul.check li { padding-left: 1.6rem; position: relative; margin-bottom: 0.5rem; }
ul.check li::before { content: "✓"; position: absolute; left: 0; color: var(--plum); font-weight: bold; }
.center { text-align: center; }

/* Forms */
form.app-form, form.admin-form { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; margin: 1rem 0 2rem; }
.form-row { margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-weight: bold; margin-bottom: 0.3rem; color: var(--plum-dark); }
label .req { color: var(--coral); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number],
input[type=password], select, textarea {
    width: 100%; padding: 0.6rem; border: 1px solid #d8c3d0; border-radius: 4px;
    font-family: inherit; font-size: 1rem; background: #fffdfb;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.input-money { position: relative; }
.input-money .input-prefix {
    position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
    color: var(--muted); pointer-events: none;
}
.input-money input { padding-left: 1.6rem; }
textarea { min-height: 120px; resize: vertical; }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.2rem; }
.hint-pair { margin: -0.4rem 0 1rem; }
.errors { background: #fdeceb; border: 1px solid var(--coral); color: #8c3532; border-radius: 6px; padding: 1rem 1.25rem; margin: 1rem 0; }
.errors ul { margin-left: 1.2rem; }
.notice { background: #eef4ea; border: 1px solid var(--green); color: #2c5738; border-radius: 6px; padding: 1rem 1.25rem; margin: 1rem 0; }

/* Honeypot */
.hp-field { position: absolute !important; left: -9999px !important; top: -9999px !important; }

/* Admin */
.admin-bar { background: var(--plum-deep); color: #fff; padding: 0.6rem 0; }
.admin-bar .container { display: flex; justify-content: space-between; align-items: center; }
.admin-bar a { color: var(--gold-soft); text-decoration: none; margin-left: 1rem; }
.related-heading { color: var(--plum-dark); font-size: 1.15rem; margin: 1.5rem 0 0.25rem; }
.related-heading .hint { display: block; font-weight: normal; margin-top: 0.15rem; }

.stats { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.25rem 0; }
.stat {
    flex: 1 1 180px; background: #fff; border: 1px solid var(--border);
    border-left: 3px solid var(--gold); border-radius: 6px; padding: 0.9rem 1.1rem;
}
.stat-value { display: block; font-size: 1.5rem; font-weight: bold; color: var(--plum-dark); line-height: 1.2; }
.stat-label { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 0.15rem; }

/* Wide table scrolls inside its own box rather than the whole page. */
.table-scroll { overflow-x: auto; }
table.apps { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); margin: 1rem 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 0.92rem; }
table.apps th, table.apps td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; }
table.apps th { background: var(--cream); color: var(--plum-dark); }
table.apps tr:hover td { background: #fbf3f8; }
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.78rem; font-weight: bold; white-space: nowrap; }
table.apps td { white-space: nowrap; }
table.apps td:nth-child(2) { white-space: normal; } /* names may wrap */
.badge-flag { background: #fdeceb; color: var(--coral); border: 1px solid var(--coral); }
.badge-new { background: #f3e4ee; color: var(--plum-dark); }
.badge-reviewed { background: #fdf3d7; color: #7a6414; }
.badge-approved { background: #eef4ea; color: var(--green); }
.badge-paid { background: var(--green); color: #fff; }
.badge-declined { background: #eee; color: var(--muted); }
.status-filter { margin: 1rem 0; display: flex; gap: 0.5rem; flex-wrap: wrap; font-family: sans-serif; font-size: 0.9rem; }
.status-filter a { text-decoration: none; color: var(--plum); padding: 0.25rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; }
.status-filter a.active { background: var(--plum); color: #fff; border-color: var(--plum); }
dl.app-detail { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem; margin: 1rem 0; }
dl.app-detail dt { font-weight: bold; color: var(--plum-dark); margin-top: 0.75rem; }
dl.app-detail dt:first-child { margin-top: 0; }
dl.app-detail dd { margin-left: 0; }

/* Footer */
.site-footer { background: var(--plum-deep); color: #ecd5e2; text-align: center; padding: 2rem 1rem; font-size: 0.95rem; flex-shrink: 0; }
.site-footer p + p { margin-top: 0.5rem; }
