/* ============================================================
   CozmicLearning — shared signup design system (2026-07-04)
   Used by: teacher_signup, homeschool_signup, student_signup,
   lite_parent_signup. Split-panel glass card: product pitch on
   the left, form on the right; stacks on mobile.

   Accent theming: put one of these on .signup-shell —
     .accent-cyan (teacher) .accent-gold (homeschool)
     .accent-lime (student) .accent-magenta (lite parent)
   ============================================================ */

.signup-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    box-sizing: border-box;
}

.signup-shell {
    --accent-1: #00f2ff;
    --accent-2: #5c6bff;
    --accent-soft: rgba(0, 242, 255, 0.12);
    position: relative;
    width: 100%;
    max-width: 1020px;
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) 1.1fr;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 24, 48, 0.92), rgba(8, 12, 28, 0.95));
    border: 1px solid rgba(118, 131, 255, 0.28);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55),
                0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    backdrop-filter: blur(14px);
    animation: signup-rise 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes signup-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.signup-shell.accent-cyan    { --accent-1: #00f2ff; --accent-2: #5c6bff; --accent-soft: rgba(0, 242, 255, 0.12); }
.signup-shell.accent-gold    { --accent-1: #ffd54f; --accent-2: #ff9500; --accent-soft: rgba(255, 213, 79, 0.12); }
.signup-shell.accent-lime    { --accent-1: #84ff00; --accent-2: #00d68f; --accent-soft: rgba(132, 255, 0, 0.12); }
.signup-shell.accent-magenta { --accent-1: #ff6fd8; --accent-2: #c084fc; --accent-soft: rgba(255, 111, 216, 0.12); }

/* Accent halo along the top edge */
.signup-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-1), var(--accent-2), transparent);
    opacity: 0.9;
    z-index: 2;
}

/* ---------- Left panel: the pitch ---------- */

.signup-pitch {
    position: relative;
    padding: 44px 36px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    background:
        radial-gradient(120% 90% at 0% 0%, var(--accent-soft), transparent 60%),
        linear-gradient(160deg, rgba(92, 107, 255, 0.10), rgba(0, 0, 0, 0.25));
    border-right: 1px solid rgba(118, 131, 255, 0.18);
}

.signup-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #dff6ff;
    font-size: 1.02rem;
    text-decoration: none;
}
.signup-brand:hover { color: #fff; }

.signup-product {
    font-size: clamp(1.7rem, 3.2vw, 2.3rem);
    line-height: 1.15;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(120deg, #ffffff 10%, var(--accent-1) 55%, var(--accent-2) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.signup-tagline {
    color: #c9dcf5;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.signup-benefits {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.signup-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #d7e6ff;
    font-size: 0.96rem;
    line-height: 1.5;
}

.signup-benefits .b-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent-soft);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.05rem;
}

.signup-benefits strong { color: #ffffff; }

.signup-pitch-note {
    margin-top: auto;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #bcd9ff;
    font-size: 0.88rem;
    line-height: 1.55;
}
.signup-pitch-note strong { color: var(--accent-1); }

/* ---------- Right panel: the form ---------- */

.signup-form-panel {
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.signup-form-title {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
}

.signup-form-sub {
    margin: 0 0 22px;
    color: #93a4c8;
    font-size: 0.92rem;
}

.sf-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sf-field label {
    display: block;
    margin-bottom: 6px;
    color: #c4d1ff;
    font-size: 0.9rem;
    font-weight: 600;
}
.sf-field label .opt { color: #7b88ad; font-weight: 500; }

.sf-field input[type="text"],
.sf-field input[type="email"],
.sf-field input[type="password"],
.sf-field input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid rgba(118, 131, 255, 0.30);
    background: rgba(0, 0, 0, 0.32);
    color: #f7fbff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color-scheme: dark; /* native date-picker chrome matches the theme */
}

.sf-field input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.sf-field input::placeholder { color: #7b88ad; }

.sf-field .hint {
    display: block;
    margin-top: 6px;
    color: #8a92b3;
    font-size: 0.8rem;
    line-height: 1.45;
}
.sf-field .hint.warn { color: #ffb84d; }

.sf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Password show/hide */
.sf-password { position: relative; }
.sf-password input { padding-right: 46px; }
.sf-password .toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.75;
    line-height: 0;
}
.sf-password .toggle:hover { opacity: 1; }

/* Choice cards (e.g. student "on my own / with my parent") */
.sf-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.sf-choice-btn {
    padding: 14px 12px;
    border-radius: 14px;
    border: 1.5px solid rgba(118, 131, 255, 0.28);
    background: rgba(0, 0, 0, 0.25);
    color: #c4d1ff;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font: inherit;
}
.sf-choice-btn .c-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #eaf3ff;
    font-size: 0.98rem;
    margin-bottom: 4px;
}
.sf-choice-btn .c-desc { font-size: 0.82rem; color: #93a4c8; line-height: 1.4; }
.sf-choice-btn:hover { border-color: var(--accent-1); }
.sf-choice-btn.active {
    border-color: var(--accent-1);
    background: var(--accent-soft);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.sf-choice-btn.active .c-desc { color: #c9dcf5; }
.sf-choice-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: rgba(118, 131, 255, 0.18);
}

/* Consent / terms card */
.sf-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(92, 107, 255, 0.08);
    border: 1px solid rgba(118, 131, 255, 0.28);
    cursor: pointer;
    color: #c4d1ff;
    font-size: 0.88rem;
    line-height: 1.55;
}
.sf-consent input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-2);
}
.sf-consent a {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--accent-soft);
}

/* Submit */
.sf-submit {
    margin-top: 4px;
    padding: 15px 18px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(120deg, var(--accent-2), var(--accent-1));
    color: #071018;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    box-shadow: 0 10px 28px var(--accent-soft);
}
.sf-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 16px 36px var(--accent-soft);
}
.sf-submit:active { transform: translateY(0); }

/* Footer links under the form */
.sf-links {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    color: #93a4c8;
    font-size: 0.88rem;
}
.sf-links a {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 600;
}
.sf-links a:hover { text-decoration: underline; }

/* Flash messages (reuse auth.css color language) */
.signup-form-panel .flash-messages { margin-bottom: 14px; }
.signup-form-panel .flash-messages .error {
    background: rgba(255, 107, 107, 0.18);
    color: #ffb3b3;
    border: 1px solid rgba(255, 107, 107, 0.35);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.signup-form-panel .flash-messages .success,
.signup-form-panel .flash-messages .info,
.signup-form-panel .flash-messages .warning {
    background: rgba(138, 247, 179, 0.16);
    color: #a9f5c6;
    border: 1px solid rgba(138, 247, 179, 0.32);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Reveal helper for conditional blocks (parent code, warnings) */
.sf-reveal { display: none; }
.sf-reveal.show {
    display: block;
    animation: signup-rise 0.3s ease;
}

/* ---------- Warm variant (Orbit Prep sub-brand) ----------
   Orbit's builder uses a warm cream/terracotta identity distinct from
   the cosmic theme. Its signup page matches, so the transition into
   /orbit/pricing/build feels intentional rather than jarring. */

.signup-shell.theme-warm {
    --accent-1: #c2410c;
    --accent-2: #b45309;
    --accent-soft: rgba(194, 65, 12, 0.10);
    background: linear-gradient(180deg, #fffdf9, #faf4ea);
    border: 1px solid #e6dfd0;
    box-shadow: 0 2px 8px rgba(28, 26, 38, 0.06), 0 24px 64px rgba(28, 26, 38, 0.10);
    backdrop-filter: none;
}
.signup-shell.theme-warm .signup-pitch {
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(194, 65, 12, 0.07), transparent 60%),
        linear-gradient(160deg, #f5efe4, #faf4ea);
    border-right: 1px solid #e6dfd0;
}
.signup-shell.theme-warm .signup-brand { color: #1c1a26; }
.signup-shell.theme-warm .signup-brand:hover { color: #c2410c; }
.signup-shell.theme-warm .signup-product {
    font-family: Georgia, 'Times New Roman', serif;
    background: linear-gradient(120deg, #1c1a26 20%, #c2410c 75%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.signup-shell.theme-warm .signup-tagline { color: #4a4538; }
.signup-shell.theme-warm .signup-benefits li { color: #4a4538; }
.signup-shell.theme-warm .signup-benefits strong { color: #1c1a26; }
.signup-shell.theme-warm .signup-benefits .b-icon {
    background: rgba(194, 65, 12, 0.10);
    border: 1px solid #e6dfd0;
}
.signup-shell.theme-warm .signup-pitch-note {
    background: #f5efe4;
    border: 1px solid #e6dfd0;
    color: #6b6558;
}
.signup-shell.theme-warm .signup-pitch-note strong { color: #c2410c; }
.signup-shell.theme-warm .signup-form-title { color: #1c1a26; }
.signup-shell.theme-warm .signup-form-sub { color: #6b6558; }
.signup-shell.theme-warm .sf-field label { color: #4a4538; }
.signup-shell.theme-warm .sf-field input[type="text"],
.signup-shell.theme-warm .sf-field input[type="email"],
.signup-shell.theme-warm .sf-field input[type="password"],
.signup-shell.theme-warm .sf-field input[type="date"] {
    background: #ffffff;
    border: 1px solid #e6dfd0;
    color: #1c1a26;
    color-scheme: light;
}
.signup-shell.theme-warm .sf-field input::placeholder { color: #a8a193; }
.signup-shell.theme-warm .sf-field .hint { color: #6b6558; }
.signup-shell.theme-warm .sf-consent {
    background: rgba(194, 65, 12, 0.05);
    border: 1px solid #e6dfd0;
    color: #4a4538;
}
.signup-shell.theme-warm .sf-submit {
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(194, 65, 12, 0.25);
}
.signup-shell.theme-warm .sf-links { color: #6b6558; }
.signup-shell.theme-warm .signup-form-panel .flash-messages .error {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.25);
}
.signup-shell.theme-warm .signup-form-panel .flash-messages .success,
.signup-shell.theme-warm .signup-form-panel .flash-messages .info,
.signup-shell.theme-warm .signup-form-panel .flash-messages .warning {
    background: rgba(77, 124, 15, 0.10);
    color: #4d7c0f;
    border: 1px solid rgba(77, 124, 15, 0.25);
}
.signup-shell.theme-warm ~ .stars,
body.warm-page .stars { display: none; }
body.warm-page {
    background: linear-gradient(180deg, #faf6ef 0%, #fdf1e7 100%);
}

/* ---------- Builder stepper (used on the /build pages) ---------- */

.build-stepper {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 8px;
}
.build-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(118, 131, 255, 0.30);
    color: #93a4c8;
    background: rgba(0, 0, 0, 0.25);
}
.build-step .n {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    background: rgba(118, 131, 255, 0.20);
}
.build-step.done, .build-step.active {
    color: #eaf3ff;
    border-color: rgba(0, 242, 255, 0.45);
}
.build-step.active .n { background: linear-gradient(120deg, #5c6bff, #00f2ff); color: #071018; }
.build-step.done .n { background: rgba(132, 255, 0, 0.35); }
/* warm-page variant of the stepper (Orbit builder) */
body.warm-page .build-step {
    border: 1px solid #e6dfd0;
    color: #6b6558;
    background: #fffdf9;
}
body.warm-page .build-step.done, body.warm-page .build-step.active { color: #1c1a26; border-color: #c2410c; }
body.warm-page .build-step.active .n { background: #c2410c; color: #fff; }
body.warm-page .build-step .n { background: rgba(194, 65, 12, 0.12); }

/* ---------- Mobile ---------- */

@media (max-width: 860px) {
    .signup-shell { grid-template-columns: 1fr; max-width: 540px; }
    .signup-pitch {
        border-right: none;
        border-bottom: 1px solid rgba(118, 131, 255, 0.18);
        padding: 30px 26px 24px;
        gap: 14px;
    }
    .signup-benefits { gap: 10px; }
    .signup-pitch-note { display: none; } /* keep mobile signup short */
    .signup-form-panel { padding: 28px 24px 34px; }
    .sf-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .signup-shell, .sf-reveal.show { animation: none; }
    .sf-submit, .sf-choice-btn, .sf-field input { transition: none; }
}
