:root {
    --paper: #f3efe6;
    --paper-2: #e9e3d6;
    --card: #fbf9f4;
    --ink: #1c1b19;
    --ink-soft: #5d584f;
    --line: #1c1b19;
    --line-soft: #d3cbba;
    --field: #1c1b19;
    --green: #1f5c4a;
    --green-ink: #f7f4ec;
    --shadow: #1c1b19;
    --marker: #f4c542;
    --wa: #1d8a4e;
    --error: #a3321f;
    --dots: #cfc6b3;

    --c0: #f6d6c4; --c1: #d8e5c8; --c2: #f4e1a6; --c3: #d6dcef; --c4: #efd3e0; --c5: #cfe6e1;

    /* aliases used by admin.php */
    --accent: var(--green);
    --accent-soft: var(--paper-2);
    --muted: var(--ink-soft);
    --surface: var(--card);
    --bg: var(--paper);
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #191815;
        --paper-2: #23211d;
        --card: #211f1b;
        --ink: #ece6d8;
        --ink-soft: #a8a090;
        --line: #4a453c;
        --line-soft: #34312b;
        --field: #5a544a;
        --green: #3d9a78;
        --green-ink: #0f1a15;
        --shadow: #000000;
        --marker: #d9a93a;
        --error: #f08b75;
        --dots: #2f2c26;

        --c0: #4a3228; --c1: #33412c; --c2: #4a4024; --c3: #2e3547; --c4: #45303b; --c5: #2a423d;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 17px/1.6 Archivo, system-ui, sans-serif;
    overflow-x: clip;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }

/* top bar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 24px;
}
.logo { font-weight: 500; font-size: 1.2rem; letter-spacing: -0.02em; }
.logo b { font-weight: 800; }
.status { font-size: .85rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wa) 25%, transparent); }

/* type */
h1 {
    font-weight: 800;
    font-size: clamp(2.4rem, 5.6vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin: 0 0 22px;
}
h2 { font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; margin: 0 0 14px; }
p { margin: 0 0 14px; }
.big { font-size: 1.25rem; line-height: 1.45; }
.small { font-size: .88rem; color: var(--ink-soft); }
.opt { font-weight: 400; color: var(--ink-soft); font-size: .85rem; margin-left: 4px; }

.scribble { position: relative; white-space: nowrap; }
.scribble svg { position: absolute; left: 0; bottom: -6px; width: 100%; height: 14px; overflow: visible; }
.scribble path { fill: none; stroke: var(--marker); stroke-width: 7; stroke-linecap: round; }

/* hero */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 48px 0 72px;
}
.hero-text p:not(.big) { color: var(--ink-soft); max-width: 460px; }
.hero-text .btn { margin-top: 10px; }

.greetings {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: radial-gradient(var(--dots) 1.5px, transparent 1.6px) 0 0 / 18px 18px;
}
.greetings::before, .greetings::after {
    content: "";
    position: absolute;
    inset: 16%;
    border: 1.5px dashed var(--line-soft);
    border-radius: 50%;
}
.greetings::after { inset: 34%; }

.bubble {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px 9px 9px;
    border: 2px solid var(--line);
    border-radius: 14px 14px 14px 3px;
    box-shadow: 3px 3px 0 var(--shadow);
    transform: rotate(var(--r));
    white-space: nowrap;
    z-index: 1;
    animation: pop .5s both;
}
.bubble b { display: block; font-size: 1rem; line-height: 1.2; }
.bubble small { display: block; font-size: .75rem; color: var(--ink-soft); }
.av {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--card);
    font-weight: 800;
    font-size: .8rem;
}
.c0 { background: var(--c0); } .c1 { background: var(--c1); animation-delay: .1s; }
.c2 { background: var(--c2); animation-delay: .2s; } .c3 { background: var(--c3); animation-delay: .3s; }
.c4 { background: var(--c4); animation-delay: .4s; } .c5 { background: var(--c5); animation-delay: .5s; }

@keyframes pop {
    from { opacity: 0; transform: rotate(var(--r)) translateY(8px) scale(.94); }
}
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } }

.you {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--green);
    color: var(--green-ink);
    display: grid;
    place-items: center;
    font-weight: 800;
    border: 2px solid var(--line);
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--green) 18%, transparent), 0 0 0 22px color-mix(in srgb, var(--green) 8%, transparent);
}

@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; gap: 32px; padding: 32px 0 48px; }
    .greetings { width: 100%; max-width: 440px; margin: 0 auto; }
}
@media (max-width: 480px) {
    .bubble { gap: 7px; padding: 6px 10px 6px 6px; }
    .bubble b { font-size: .85rem; }
    .bubble small { font-size: .66rem; }
    .av { width: 24px; height: 24px; font-size: .7rem; }
    .you { width: 50px; height: 50px; font-size: .85rem; }
    .c1, .c3, .c5 { left: auto !important; right: 0; }
}

/* familiar + how */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    padding: 56px 0;
    border-top: 2px solid var(--line);
}
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 40px; padding: 40px 0; } }

.familiar ul { list-style: none; padding: 0; margin: 0; }
.familiar li { padding: 12px 0 12px 32px; border-top: 1px solid var(--line-soft); position: relative; }
.familiar li::before { content: "✓"; position: absolute; left: 4px; font-weight: 800; color: var(--green); }
.note { font-family: Caveat, cursive; font-size: 1.6rem; color: var(--green); transform: rotate(-2deg); margin: 12px 0 0 32px; }

.how-grid p { margin: 0; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.how-grid b { display: block; }

/* buttons */
.btn, .btn-secondary {
    display: inline-block;
    padding: 13px 22px;
    font: 700 1rem Archivo, sans-serif;
    color: var(--green-ink);
    background: var(--green);
    border: 2px solid var(--line);
    border-radius: 6px;
    box-shadow: 3px 3px 0 var(--shadow);
    text-decoration: none;
    cursor: pointer;
    transition: transform .08s, box-shadow .08s;
}
.btn:hover, .btn-secondary:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--shadow); }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn.ghost, .btn-secondary { background: var(--card); color: var(--ink); }
.btn.wa { background: var(--wa); color: #fff; }
.link { background: none; border: 0; padding: 8px 0; font: 500 .95rem Archivo, sans-serif; color: var(--ink-soft); cursor: pointer; }
.link:hover { color: var(--ink); }

/* form */
.join { padding: 64px 0; background: var(--paper-2); margin: 0 calc(50% - 50vw); padding-left: 16px; padding-right: 16px; }
form.signup {
    max-width: 560px;
    margin: 0 auto;
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 12px;
    box-shadow: 6px 6px 0 var(--shadow);
    padding: 28px;
    display: grid;
    gap: 18px;
    scroll-margin-top: 24px;
}
@media (max-width: 480px) { form.signup { padding: 20px; box-shadow: 4px 4px 0 var(--shadow); } }

.form-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.form-head h2 { margin: 0; }
.step-count { display: none; font-size: .85rem; color: var(--ink-soft); }
.stepped .step-count { display: inline; }

.step { display: grid; gap: 18px; }
.next, .back { display: none; }
.stepped .step:not(.active) { display: none; }
.stepped .next { display: block; width: 100%; }
.stepped .back { display: inline-block; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.actions .btn { flex: 1; }
.stepped .actions .btn { flex: 0 1 auto; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }

label { display: grid; gap: 6px; font-weight: 700; font-size: .95rem; }

input[type=text], input[type=email], input[type=password], select {
    width: 100%;
    padding: 12px 13px;
    font: 400 1rem Archivo, sans-serif;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--field);
    border-radius: 6px;
}
input::placeholder { color: var(--ink-soft); opacity: .75; }
input:focus, select:focus { outline: 3px solid var(--marker); outline-offset: 0; border-color: var(--ink); }

fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
legend { font-weight: 700; font-size: .95rem; margin-bottom: 8px; padding: 0; }

.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.choice input { margin-top: 5px; accent-color: var(--green); width: 16px; height: 16px; }
.consent { font-size: .85rem; color: var(--ink-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; }
.chip input { position: absolute; opacity: 0; }
.chip span {
    display: inline-block;
    padding: 7px 13px;
    border: 2px solid var(--field);
    border-radius: 99px;
    font-weight: 500;
    font-size: .92rem;
    cursor: pointer;
    user-select: none;
}
.chip input:checked + span { background: var(--marker); border-color: var(--ink); color: #1c1b19; }
.chip input:focus-visible + span { outline: 3px solid var(--green); }

.errors { border: 2px solid var(--error); color: var(--error); padding: 12px 16px; border-radius: 6px; }
.errors p { margin: 2px 0; }

.hp { position: absolute; left: -9999px; }

/* faq */
.faq { max-width: 680px; padding: 64px 0 16px; }
details { border-top: 1px solid var(--line-soft); padding: 14px 0; }
summary { font-weight: 700; cursor: pointer; }
details p { margin: 8px 0 0; color: var(--ink-soft); }

/* after signup */
.done { max-width: 640px; padding: 64px 0; }
.share { margin-top: 28px; padding: 22px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 6px 6px 0 var(--shadow); display: grid; gap: 12px; }
.share label { font-size: .85rem; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; }
.share .btn.wa { justify-self: start; }
.share .small { margin: 0; }

footer { padding: 32px 24px 48px; font-size: .85rem; color: var(--ink-soft); }

/* admin */
.card { background: var(--card); border: 2px solid var(--line); border-radius: 8px; padding: 20px; display: grid; gap: 12px; }
.muted { color: var(--ink-soft); }
