:root {
    --bg: #fffbea;          /* vanilla cream */
    --bg-2: #f6f9df;
    --card: #ffffff;
    --line: #e8e6c8;
    --text: #2b2a1f;
    --muted: #6f6c55;
    --lime: #9bd636;        /* logo green */
    --lime-dark: #5f9a12;
    --gold: #ffc52e;        /* logo yellow */
    --gold-dark: #e09a00;
    --ink: #1e1d16;         /* logo outline */
    --ok: #3fae5a;
    --err: #e5484d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Nunito', system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(900px 500px at 85% -10%, #eaf8c4 0%, transparent 60%),
        radial-gradient(800px 500px at -10% 10%, #fff0b8 0%, transparent 55%),
        var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background image (set in config.php, rule printed in the page head) */
body.has-bg .lead { color: var(--ink); text-shadow: 0 1px 8px rgba(255, 255, 255, .9); }
body.has-bg .eyebrow { text-shadow: 0 1px 6px rgba(255, 255, 255, .9); }
body.has-bg .foot { background: rgba(255, 251, 234, .85); }

a { color: var(--lime-dark); }
main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
h2, h3 { font-family: 'Fredoka', 'Nunito', sans-serif; }

/* ---- Nav ---------------------------------------------------------------- */
.nav { background: rgba(255, 251, 234, .85); backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 980px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: block; line-height: 0; }
.brand img { height: 52px; width: auto; transition: transform .2s; }
.brand:hover img { transform: rotate(-3deg) scale(1.04); }
.nav nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 800; }
.nav nav a:hover { color: var(--text); background: var(--bg-2); }
.nav nav a.active { color: var(--ink); background: var(--gold); }

/* ---- Hero --------------------------------------------------------------- */
.hero { text-align: center; padding: 48px 0 56px; }
.eyebrow { color: var(--lime-dark); text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 800; margin: 0 0 8px; }
.hero-logo { margin: 0; line-height: 0; }
.hero-logo img { width: min(480px, 90%); height: auto; filter: drop-shadow(0 12px 18px rgba(120, 140, 20, .25)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .hero-logo img { animation: none; } }
.lead { color: var(--muted); font-size: 1.2rem; font-weight: 700; margin: 20px 0 28px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Buttons (chunky, like the logo) ------------------------------------ */
.btn { display: inline-block; padding: 12px 24px; border-radius: 999px; text-decoration: none; border: 3px solid var(--ink); cursor: pointer; font: inherit; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.05rem; box-shadow: 0 4px 0 var(--ink); transition: transform .1s, box-shadow .1s, filter .15s; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: linear-gradient(180deg, #c6f05a 0%, var(--lime) 100%); color: var(--ink); }
.btn-ghost { background: linear-gradient(180deg, #ffe07a 0%, var(--gold) 100%); color: var(--ink); }
.btn-block { width: 100%; margin-top: 8px; }

/* ---- Steps -------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding-bottom: 72px; }
.step { display: block; background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 22px;
    color: var(--text); text-decoration: none; box-shadow: 0 6px 16px rgba(120, 110, 40, .08);
    transition: transform .15s, border-color .15s, box-shadow .15s; }
.step:hover, .step:focus-visible { transform: translateY(-4px); border-color: var(--lime); box-shadow: 0 10px 22px rgba(95, 154, 18, .18); }
.step h3 { margin: 12px 0 6px; font-size: 1.25rem; }
.step p { margin: 0; color: var(--muted); }
.num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--ink); border: 2px solid var(--ink); font-family: 'Fredoka', sans-serif; font-weight: 700; transition: background .15s; }
.step:hover .num, .step:focus-visible .num { background: var(--lime); }

/* ---- Card + form -------------------------------------------------------- */
.card { max-width: 520px; margin: 48px auto; background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: 0 10px 28px rgba(120, 110, 40, .1); }
.card h2 { margin: 0 0 6px; font-size: 1.7rem; }
.muted { color: var(--muted); margin-top: 0; }
form { display: grid; gap: 14px; margin-top: 18px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
input, select { width: 100%; padding: 11px 13px; border-radius: 12px; border: 2px solid var(--line); background: #fffef6; color: var(--text); font: inherit; }
input:focus, select:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 4px rgba(155, 214, 54, .25); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -9999px; }

.alert { border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-weight: 600; }
.alert ul { margin: 0; padding-left: 18px; }
.alert.ok { background: #eafbe9; border: 2px solid var(--ok); }
.alert.err { background: #fdecec; border: 2px solid var(--err); }

/* ---- Footer ------------------------------------------------------------- */
.foot { border-top: 2px solid var(--line); text-align: center; color: var(--muted); font-size: .85rem; padding: 20px 16px; }

@media (max-width: 560px) {
    .row { grid-template-columns: 1fr; }
    .hero { padding: 32px 0 40px; }
    .nav-inner { padding: 8px 10px; gap: 6px; }
    .brand img { height: 34px; }
    .nav nav { gap: 0; flex-wrap: nowrap; }
    .nav nav a { padding: 6px 7px; font-size: .82rem; white-space: nowrap; }
}
