/**
 * Funnel front door (spec 012, FR-013) — Figma node 1:822.
 * Auto-enqueued by FunnelController on funnel requests.
 * Every selector is scoped under .cu-front-door.
 */

.cu-front-door {
    --cu-fd-maroon: var(--purple, #750444);
    --cu-fd-maroon-hover: #5c0336;
    --cu-fd-heading: var(--bs-heading-color, #751144);
    --cu-fd-ink: var(--text-body-color, #4f2a10);
    --cu-fd-card-bg: #FAF3E0;
    --cu-fd-card-border: #ddd2b8;
    --cu-fd-divider: #e6dcc2;

    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 24px 72px;
    font-family: "Proza Libre", sans-serif;
    color: var(--cu-fd-ink);
}

/* ---------- Shared headings ---------- */

.cu-front-door__heading {
    margin: 0 0 20px;
    font-family: "Palatino", "Palatino Linotype", "Book Antiqua", serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: var(--cu-fd-heading);
}

.cu-front-door__subheading {
    max-width: 460px;
    margin: 0 auto 40px;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    color: var(--cu-fd-ink);
}

/* ---------- Login ---------- */

.cu-front-door__login {
    /* The 64px gap to "New to Compassion U?" is held by the error slot inside
       the form (see .cu-form-error-slot) so an error can appear in it. */
    margin-bottom: 0;
}

.cu-front-door__login-form {
    max-width: 340px;
    margin: 0 auto;
}

/* The login error lands under the button in a slot that is always there, so
   showing it moves nothing. 16px gap + 48px (one line of .cu-form-error) = the
   64px the section used to carry as margin-bottom, hence the 0 below. */
.cu-front-door__login-form .cu-form-error-slot {
    min-height: 48px;
    margin-top: 16px;
}

.cu-front-door__login-form .cu-form-error {
    margin: 0;
}

.cu-front-door__field {
    margin-bottom: 16px;
}

.cu-front-door__field label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--cu-fd-ink);
}

.cu-front-door__field input {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfc4a9;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    color: var(--cu-fd-ink);
}

.cu-front-door__field input::placeholder {
    color: #b3a88f;
}

.cu-front-door__field input:focus {
    outline: 2px solid var(--cu-fd-maroon);
    outline-offset: 1px;
    border-color: var(--cu-fd-maroon);
}

.cu-front-door__forgot {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cu-fd-maroon);
    text-decoration: underline;
}

.cu-front-door__forgot:hover,
.cu-front-door__forgot:focus {
    color: var(--cu-fd-maroon-hover);
}

.cu-front-door__remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.cu-front-door__remember input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--cu-fd-maroon);
}

.cu-front-door__remember label {
    margin: 0;
    font-size: 14px;
    color: var(--cu-fd-ink);
}

/* ---------- Buttons ---------- */

.cu-front-door__btn {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.cu-front-door__btn--login {
    background-color: var(--cu-fd-maroon);
}

.cu-front-door__btn--login:hover,
.cu-front-door__btn--login:focus {
    background-color: var(--cu-fd-maroon-hover);
    color: #fff;
}

.cu-front-door__btn--enroll {
    background-color: var(--cu-fd-accent, var(--cu-fd-maroon));
}

.cu-front-door__btn--enroll:hover,
.cu-front-door__btn--enroll:focus {
    background-color: var(--cu-fd-accent-hover, var(--cu-fd-maroon-hover));
    color: #fff;
}

/* ---------- Journey / error ---------- */

.cu-front-door__error {
    max-width: 640px;
    margin: 0 auto 28px;
    padding: 12px 16px;
    border: 1px solid var(--cu-fd-maroon);
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    color: var(--cu-fd-maroon);
    background: #fdeef5;
}

/* ---------- Course track cards ---------- */

.cu-front-door__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 0 0 40px;
    padding: 0;
    list-style: none;
}

.cu-front-door__card {
    display: flex;
    flex-direction: column;
    padding: 24px 20px 20px;
    border: 1px solid var(--cu-fd-card-border);
    border-radius: 10px;
    background: var(--cu-fd-card-bg);
    box-shadow: 0 2px 6px rgba(79, 42, 16, 0.08);
}

/* Per-track accents (Figma: maroon / olive / orange / blue). */

.cu-front-door__card--maroon {
    --cu-fd-accent: var(--purple, #750444);
    --cu-fd-accent-hover: #5c0336;
    --cu-fd-accent-soft: #f6dcec;
}

.cu-front-door__card--olive {
    --cu-fd-accent: var(--green, #5c6b36);
    --cu-fd-accent-hover: #4a562c;
    --cu-fd-accent-soft: #e7e9d3;
}

.cu-front-door__card--orange {
    --cu-fd-accent: #d95d13;
    --cu-fd-accent-hover: #b84e10;
    --cu-fd-accent-soft: #fbe3cb;
}

.cu-front-door__card--blue {
    --cu-fd-accent: #1d7fd0;
    --cu-fd-accent-hover: #1868ab;
    --cu-fd-accent-soft: #d6e9f9;
}

.cu-front-door__card-title {
    margin: 0 0 10px;
    font-family: "Palatino", "Palatino Linotype", "Book Antiqua", serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #3a2b1a;
}

.cu-front-door__card-tag {
    align-self: flex-start;
    margin-bottom: 16px;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--cu-fd-accent, var(--cu-fd-maroon));
    background: var(--cu-fd-accent-soft, #f6dcec);
}

.cu-front-door__card-description {
    flex-grow: 1;
    margin: 0 0 18px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--cu-fd-ink);
}

.cu-front-door__card-built {
    /* Room for two lines: keeps the first line and the divider underneath at
       the same height on every card, whether or not the text wraps. */
    min-height: calc(2 * 1.55em + 14px);
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cu-fd-divider);
    font-size: 13.5px;
    line-height: 1.55;
    font-weight: 700;
    color: var(--cu-fd-accent, var(--cu-fd-maroon));
}

.cu-front-door__card-teacher {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

/* Empty stand-in on cards with no instructor: same height as the teacher
   row (36px photo), so dividers and price rows align across the card row. */
.cu-front-door__card-teacher--spacer {
    min-height: 40px;
}

.cu-front-door__card-teacher-photo {
    width: 36px;
    height: 36px;
    max-width: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.cu-front-door__card-teacher-info {
    display: flex;
    flex-direction: column;
}

.cu-front-door__card-teacher-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #3a2b1a;
}

.cu-front-door__card-teacher-role {
    font-size: 12px;
    color: #7c6a53;
}

.cu-front-door__card-pricing {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.cu-front-door__card-price {
    font-family: "Palatino", "Palatino Linotype", "Book Antiqua", serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #3a2b1a;
}

.cu-front-door__card-starts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.cu-front-door__card-starts-label {
    font-size: 11px;
    color: #7c6a53;
}

.cu-front-door__card-starts-date {
    font-size: 13px;
    font-weight: 600;
    color: #3a2b1a;
}

.cu-front-door__card-coming-soon {
    font-size: 13px;
    color: #7c6a53;
}

.cu-front-door__enroll {
    margin: 0;
}

/* ---------- Learn more bar ---------- */

.cu-front-door__learn-more {
    display: block;
    padding: 15px 16px;
    border-radius: 6px;
    background-color: var(--cu-fd-maroon);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: background-color 0.15s ease-in-out;
}

.cu-front-door__learn-more:hover,
.cu-front-door__learn-more:focus {
    background-color: var(--cu-fd-maroon-hover);
    color: #fff;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .cu-front-door__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .cu-front-door {
        padding: 32px 16px 48px;
    }

    .cu-front-door__heading {
        font-size: 27px;
    }

    /* Same trade as above, against the tighter 48px mobile gap: the slot alone
       holds it, so the error appears without pushing the cards down. */
    .cu-front-door__login {
        margin-bottom: 0;
    }

    .cu-front-door__login-form .cu-form-error-slot {
        margin-top: 0;
    }

    .cu-front-door__cards {
        grid-template-columns: 1fr;
    }

    /* Single column: nothing to align against — drop the alignment padding. */
    .cu-front-door__card-teacher--spacer {
        display: none;
    }

    .cu-front-door__card-built {
        min-height: 0;
    }
}
