/* Sign-up: app-style card with Pip. */
:root {
    --su-ink: #1b2a24;
    --su-text: #4a5a53;
    --su-muted: #6f7f78;
    --su-line: #e2e8e4;
    --su-line-strong: #d3dbd6;
    --su-surface: #f6f8f7;
    --su-green: #03875f;
    --su-green-lip: #026447;
    --su-green-bright: #12b886;
    --su-sel-bg: #eafaf3;
    --su-sel-ink: #05603f;
    --su-spring: cubic-bezier(.34, 1.56, .64, 1);
    --su-ease: cubic-bezier(.22, 1, .36, 1);
}

body:has(.su-page) { background: #fff; }
.su-page {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 72px);
    min-height: calc(100dvh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px 40px;
    overflow: hidden;
    color: var(--su-text);
    -webkit-tap-highlight-color: transparent;
}
.su-page button:hover, .su-page a:hover { transform: none; }
.su-page :focus-visible { outline: 3px solid #7fdcb8; outline-offset: 3px; }

/* mint band with a faint dot grid, fading out downwards */
.su-band {
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    height: 72%;
    background:
        radial-gradient(circle, #cfeedd 1.3px, transparent 1.5px) 0 0 / 22px 22px,
        radial-gradient(120% 100% at 50% 0%, #e2f7ec 0%, #f1fbf6 60%, #fff 100%);
    -webkit-mask-image: linear-gradient(#000 50%, transparent);
    mask-image: linear-gradient(#000 50%, transparent);
}

/* drawn ingredients drifting on the sides (desktop) */
.su-float { display: none; position: absolute; z-index: -1; line-height: 0; opacity: .95; }
.su-float svg { width: 56px; height: 56px; filter: drop-shadow(0 6px 10px rgba(20, 60, 40, .12)); animation: suDrift 6s ease-in-out infinite; }
@media (min-width: 1024px) {
    .su-float { display: block; }
    .su-float-1 { top: 16%; left: 12%; transform: rotate(-14deg); }
    .su-float-2 { top: 54%; left: 7%; transform: rotate(10deg); }
    .su-float-2 svg { width: 72px; height: 72px; animation-delay: -2s; }
    .su-float-3 { bottom: 12%; left: 18%; transform: rotate(-8deg); }
    .su-float-3 svg { animation-delay: -4s; }
    .su-float-4 { top: 14%; right: 12%; transform: rotate(18deg); }
    .su-float-4 svg { width: 64px; height: 64px; animation-delay: -1s; }
    .su-float-5 { top: 50%; right: 7%; transform: rotate(-12deg); }
    .su-float-5 svg { animation-delay: -3s; }
    .su-float-6 { bottom: 14%; right: 17%; transform: rotate(6deg); }
    .su-float-6 svg { width: 44px; height: 44px; animation-delay: -5s; }
}
@keyframes suDrift { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(6deg); } }

.su-wrap { width: 100%; max-width: 460px; }

/* ---------- Card ---------- */
.su-card {
    position: relative;
    padding: 26px 22px 22px;
    border: 2px solid var(--su-line);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 5px 0 var(--su-line), 0 30px 60px -40px rgba(10, 60, 40, .35);
    text-align: center;
    animation: suCardIn .55s var(--su-spring) backwards;
}
@keyframes suCardIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@media (min-width: 640px) { .su-card { padding: 32px 36px 28px; } }

.su-ready {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--su-sel-bg);
    color: var(--su-sel-ink);
    font-size: 11px;
    font-weight: 700;
}
.su-ready i { color: #f0a800; font-size: 10px; }

.su-hero { position: relative; width: 170px; height: 112px; margin: 0 auto 6px; }
.su-pip { position: absolute; left: 50%; bottom: 0; width: 92px; margin-left: -46px; }
.su-pip .mm-mascot { width: 100%; animation: mmPopIn .6s var(--su-spring) .1s backwards; }
.su-envelope {
    position: absolute;
    right: 0;
    top: 10px;
    line-height: 0;
    animation: suEnvelope 2.6s ease-in-out infinite, mmPopIn .5s var(--su-spring) .45s backwards;
}
@keyframes suEnvelope { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-8px) rotate(6deg); } }
.su-hero-say { width: auto; height: auto; margin-bottom: 4px; }
.su-hero-say .mm-say { margin-bottom: 4px; }

.su-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--su-sel-bg);
    color: var(--su-sel-ink);
    font-size: 12px;
    font-weight: 700;
}
.su-title {
    margin: 0;
    color: var(--su-ink);
    font-size: clamp(1.65rem, 1.2rem + 1.8vw, 2.15rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.03em;
    text-wrap: balance;
}
.su-accent { color: #079a68; white-space: nowrap; }
.su-title-2 { margin: 6px 0 0; color: var(--su-ink); font-size: clamp(1.15rem, 1rem + .6vw, 1.35rem); font-weight: 700; letter-spacing: -.01em; }
.su-sub { margin: 8px auto 0; max-width: 24rem; color: var(--su-muted); font-size: 14px; line-height: 1.5; }
.su-sub strong { color: var(--su-ink); font-weight: 700; word-break: break-all; }

/* ---------- Error ---------- */
.su-error {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 0;
    padding: 12px 14px;
    border: 2px solid #f5c2bc;
    border-radius: 16px;
    background: #fff0ee;
    box-shadow: 0 3px 0 #f5c2bc;
    text-align: left;
    animation: suShake .42s ease;
}
.su-error p { margin: 0; color: #a52a20; font-size: 14px; font-weight: 700; }
.su-error-pip { width: 40px; flex-shrink: 0; }
.su-error-pip .mm-mascot { width: 100%; }
@keyframes suShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

/* ---------- Buttons + inputs ---------- */
.su-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 56px;
    padding: 0 20px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .05em;
    cursor: pointer;
    transition: transform .1s ease, box-shadow .1s ease, background-color .15s ease, border-color .15s ease, filter .15s ease;
}
.su-page .su-btn:active { transform: translateY(4px); }
.su-btn-google {
    margin-top: 20px;
    border: 2px solid var(--su-line);
    background: #fff;
    box-shadow: 0 4px 0 var(--su-line);
    color: var(--su-ink);
    letter-spacing: 0;
    font-size: 16px;
}
@media (hover: hover) { .su-btn-google:hover { background: var(--su-surface); border-color: var(--su-line-strong); box-shadow: 0 4px 0 var(--su-line-strong); } }
.su-page .su-btn-google:active { box-shadow: 0 0 0 var(--su-line); }
.su-btn-primary {
    margin-top: 12px;
    background: var(--su-green);
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0 4px 0 var(--su-green-lip);
}
@media (hover: hover) { .su-btn-primary:hover { filter: brightness(1.08); } }
.su-page .su-btn-primary:active { box-shadow: 0 0 0 var(--su-green-lip); }
.su-btn-primary i { font-size: 14px; }
.su-btn.is-loading { opacity: .8; pointer-events: none; cursor: progress; }
.su-btn.is-loading i { animation: suFly .8s ease-in-out infinite alternate; }
@keyframes suFly { from { transform: translate(0, 0); } to { transform: translate(4px, -3px); } }

.su-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--su-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.su-or::before, .su-or::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: var(--su-line); }

.su-form { text-align: left; }
.su-field { position: relative; }
/* ~ not +: an sr-only <label> sits between the name and email fields */
.su-field ~ .su-field { margin-top: 12px; }
.su-field i { position: absolute; z-index: 2; left: 18px; top: 50%; transform: translateY(-50%); color: #9aa7a1; font-size: 16px; pointer-events: none; transition: color .15s ease; }
.su-input {
    width: 100%;
    height: 56px;
    padding: 0 16px 0 48px;
    border: 2px solid var(--su-line);
    border-radius: 16px;
    background: var(--su-surface);
    color: var(--su-ink);
    font-size: 16px;               /* never below 16px, or iOS zooms on focus */
    font-weight: 600;
    outline: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.su-input::placeholder { color: #aab5af; font-weight: 500; }
.su-input:focus { border-color: var(--su-green-bright); background: #fff; box-shadow: 0 0 0 4px rgba(18, 184, 134, .16); }
.su-field:focus-within i { color: var(--su-green-bright); }

/* The shared 6-digit code field (includes/otp-input.php), dressed up here only. */
.su-code #code {
    height: 68px;
    border: 2px solid var(--su-line);
    border-radius: 18px;
    background: var(--su-surface);
    color: var(--su-ink);
    font-size: 30px;
    font-weight: 700;
    box-shadow: none;
}
.su-code #code:focus { border-color: var(--su-green-bright); background: #fff; box-shadow: 0 0 0 4px rgba(18, 184, 134, .16); }
.su-form-code { margin-top: 20px; }

.su-resend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; margin-top: 16px; color: var(--su-muted); font-size: 13px; }
.su-link { color: var(--su-green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Privacy + legal ---------- */
.su-privacy {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--su-sel-bg);
    text-align: left;
}
.su-privacy-icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px; background: #fff; color: var(--su-green-bright); font-size: 14px; box-shadow: 0 2px 0 #cdeedd; }
.su-privacy strong { display: block; color: var(--su-ink); font-size: 13px; font-weight: 700; }
.su-privacy div > span { display: block; margin-top: 1px; color: var(--su-muted); font-size: 12px; }
.su-legal { margin: 16px auto 0; max-width: 26rem; color: var(--su-muted); font-size: 12px; line-height: 1.6; text-align: center; }
.su-legal a { text-decoration: underline; text-underline-offset: 2px; }
.su-legal a:hover { color: var(--su-ink); }

/* ---------- Login (login.php reuses this card) ---------- */
.li-badge {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    top: 6px;
    border: 2px solid var(--su-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 0 var(--su-line);
    color: var(--su-green-bright);
    font-size: 18px;
    line-height: 1;
}
/* the password form follows the subtitle or the error directly (no Google button above it) */
.su-sub + .li-form, .su-error + .li-form { margin-top: 20px; }
.li-alt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin-top: 18px; font-size: 13px; }
.li-alt form { display: inline; }
.li-alt .su-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; font-size: 13px; }
.li-alt .su-link i { font-size: 11px; }
.li-dot { color: var(--su-line-strong); }
.li-switch { margin: 14px 0 0; color: var(--su-text); font-size: 14px; text-align: center; }
.li-switch a { color: var(--su-green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* confetti host */
.su-hero .ob-confetti { position: absolute; }

/* phones: flatter, fuller-width card */
@media (max-width: 479px) {
    .su-page { align-items: flex-start; padding-top: 8px; }
    .su-card { padding: 22px 18px 18px; border-radius: 24px; }
    .su-ready { position: static; margin-bottom: 4px; }
    .su-hero { height: 100px; }
    .su-pip { width: 82px; margin-left: -41px; }
}
@media (prefers-reduced-motion: reduce) {
    .su-page *, .su-page *::before, .su-page *::after, .su-card { animation: none !important; transition: none !important; }
}
