@import "https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";

/* Public homepage v2 — matches design mockup */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body.homepage-v2-body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

.homepage-v2-page {
    /* ImagePartner brand: purple UI accents + blue from the wordmark logo */
    --hp2-primary: #6633ff;
    --hp2-primary-dark: #5528d9;
    --hp2-primary-gradient: linear-gradient(135deg, #6633ff 0%, #5528d9 100%);
    --hp2-brand-blue: #6da5e2;
    --hp2-brand-navy: #243b6b;
    --hp2-text-dark: #15152f;
    --hp2-text-muted: #5b6472;
    --hp2-feature-text: #1f2937;
    --hp2-help-bg: #e8f4fc;
    --hp2-help-text: #0369a1;
    --hp2-border: #dde3ed;
    --hp2-gradient-start: #eef0ff;
    --hp2-gradient-mid: #e8f4fc;
    --hp2-gradient-end: #fff9e6;
    --hp2-inset-x: 17%;

    height: 100dvh;
    max-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    background: linear-gradient(135deg, var(--hp2-gradient-start) 0%, var(--hp2-gradient-mid) 45%, var(--hp2-gradient-end) 100%);
    font-family: "Poppins", sans-serif;
    color: var(--hp2-text-dark);
    -webkit-font-smoothing: antialiased;
}

/* Header */
.homepage-v2__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px var(--hp2-inset-x) 0;
}

.homepage-v2__brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    line-height: 1;
}

.homepage-v2__brand-logo {
    display: block;
    height: 46px;
    width: auto;
    max-width: 260px;
}

.homepage-v2__brand-tagline {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--hp2-brand-navy);
    opacity: 0.72;
    padding-left: 2px;
}

.homepage-v2__help-link {
    position: absolute;
    top: 32px;
    right: 36px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hp2-text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    white-space: nowrap;
}

.homepage-v2__help-link:hover {
    color: var(--hp2-brand-blue);
}

.homepage-v2__help-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
}

/* Plain ? in a circle — reads clearly at small sizes (replaces broken stroke SVG) */
.homepage-v2__help-link-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.homepage-v2__help-link:hover .homepage-v2__help-link-icon {
    border-color: var(--hp2-brand-blue);
    color: var(--hp2-brand-blue);
}

/* Main — hero top-aligned, card vertically centred */
.homepage-v2__main {
    min-height: 0;
    display: grid;
    grid-template-columns: 1.15fr 420px;
    align-items: center;
    gap: 48px;
    padding: 16px var(--hp2-inset-x) 12px;
}

.homepage-v2__hero {
    align-self: start;
    padding-top: clamp(4px, 1.5vh, 20px);
    min-width: 0;
}

.homepage-v2__badge {
    display: inline-block;
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--hp2-brand-blue);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.homepage-v2__hero h1 {
    font-size: clamp(2.1rem, 4.2vw, 4.1rem);
    line-height: 1.04;
    margin: 18px 0 14px;
    color: var(--hp2-text-dark);
    font-weight: 800;
    letter-spacing: -0.025em;
    max-width: 640px;
}

.homepage-v2__hero h1 em {
    font-style: normal;
    color: var(--hp2-brand-blue);
}

.homepage-v2__hero > p {
    font-size: clamp(0.98rem, 1.15vw, 1.12rem);
    max-width: 520px;
    color: var(--hp2-text-muted);
    line-height: 1.55;
    margin: 0;
}

.homepage-v2__features {
    display: flex;
    flex-wrap: nowrap;
    gap: clamp(14px, 2vw, 32px);
    margin-top: 22px;
    color: var(--hp2-feature-text);
    font-weight: 600;
    list-style: none;
    padding: 0;
}

.homepage-v2__feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    white-space: nowrap;
}

.homepage-v2__feature-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--hp2-brand-blue);
}

.homepage-v2__showcase {
    margin-top: calc(clamp(12px, 2vh, 24px) - 60px);
    line-height: 0;
}

.homepage-v2__showcase img {
    display: block;
    width: 100%;
    max-width: 860px;
    max-height: min(440px, 42vh);
    height: auto;
    object-fit: contain;
    object-position: left bottom;
    filter: drop-shadow(0 12px 28px rgba(21, 21, 47, 0.08));
}

/* Hide only the product graphic on very short desktop viewports (hero text stays visible) */
@media (max-height: 720px) and (min-width: 961px) {
    .homepage-v2__showcase {
        display: none;
    }
}

/* Login card */
.homepage-v2__login-card {
    position: relative;
    background: white;
    border-radius: 26px;
    padding: 32px 36px 28px;
    box-shadow: 0 20px 70px rgba(21, 21, 47, 0.14);
    width: 100%;
    max-width: 420px;
    justify-self: end;
    align-self: center;
    margin-top: -80px;
    overflow: visible;
}

.homepage-v2__login-card-body {
    max-height: calc(100dvh - 200px);
    overflow-y: auto;
}

.homepage-v2__icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--hp2-brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.homepage-v2__icon svg {
    width: 26px;
    height: 26px;
}

.homepage-v2__login-card h2 {
    text-align: center;
    color: var(--hp2-brand-blue);
    font-size: 1.75rem;
    margin: 0 0 6px;
    font-weight: 700;
}

.homepage-v2__login-card .homepage-v2__card-intro {
    text-align: center;
    color: var(--hp2-text-muted);
    margin: 0 0 22px;
    line-height: 1.45;
    font-size: 0.88rem;
}

.homepage-v2__label {
    display: block;
    font-weight: 600;
    color: var(--hp2-text-dark);
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.homepage-v2__input-wrap {
    position: relative;
    margin-bottom: 16px;
}

.homepage-v2__input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: #9ca3af;
    pointer-events: none;
}

.homepage-v2__input {
    width: 100%;
    padding: 14px 14px 14px 40px;
    border: 1px solid var(--hp2-border);
    border-radius: 12px;
    font-size: 0.92rem;
    font-family: inherit;
    background: #fff;
    color: var(--hp2-text-dark);
}

.homepage-v2__input:focus {
    outline: 2px solid rgba(102, 51, 255, 0.25);
    border-color: var(--hp2-primary);
}

.homepage-v2__input--error {
    border-color: #ef4444;
}

.homepage-v2__error {
    display: block;
    color: #dc2626;
    font-size: 0.82rem;
    margin: -10px 0 10px;
}

.homepage-v2__error-alert {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.85rem;
}

.homepage-v2__error-alert p {
    margin: 0;
}

.homepage-v2__submit {
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-radius: 12px;
    background: var(--hp2-brand-blue);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
}

.homepage-v2__submit:hover {
    filter: brightness(1.04);
}

.homepage-v2__help-box {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin: 20px 0 0;
    padding: 14px 15px;
    border-radius: 12px;
    background: var(--hp2-help-bg);
    color: var(--hp2-help-text);
    font-size: 0.82rem;
    line-height: 1.45;
}

.homepage-v2__help-box-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--hp2-brand-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.homepage-v2__help-box p {
    margin: 0;
}

.homepage-v2__divider {
    height: 1px;
    background: #e8ecf1;
    margin: 18px 0;
}

.homepage-v2__alt-login {
    text-align: center;
}

.homepage-v2__alt-login > p {
    color: var(--hp2-text-muted);
    font-size: 0.82rem;
    margin: 0 0 10px;
}

.homepage-v2__btn-outline {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid var(--hp2-brand-blue);
    background: white;
    color: var(--hp2-brand-blue);
    font-weight: 700;
    font-size: 0.88rem;
    text-align: center;
    text-decoration: none;
}

.homepage-v2__btn-outline:hover {
    background: rgba(109, 165, 226, 0.08);
}

.homepage-v2__photographer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--hp2-text-muted);
}

.homepage-v2__photographer p {
    margin: 0;
}

.homepage-v2__photographer a {
    color: var(--hp2-brand-blue);
    font-weight: 700;
    text-decoration: none;
}

.homepage-v2__photographer a:hover {
    text-decoration: underline;
}

/* Email verification step (matches login card on homepage v2) */
.homepage-v2__verified-banner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 14px 15px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.82rem;
    line-height: 1.45;
}

.homepage-v2__verified-banner svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: #10b981;
}

.homepage-v2__verified-banner strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 2px;
    color: #065f46;
}

.homepage-v2__verified-code {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
}

.homepage-v2__actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Email verification: skip form follows main form (not .homepage-v2__actions + .homepage-v2__actions). */
.homepage-v2__login-card-body form + form.homepage-v2__actions {
    margin-top: 5px;
}

.homepage-v2__actions .homepage-v2__btn-outline {
    width: 100%;
    cursor: pointer;
    font-family: inherit;
}

.homepage-v2__help-box p + p {
    margin-top: 6px;
}

/* Bottom */
.homepage-v2__bottom {
    padding: 0 var(--hp2-inset-x) 14px;
}

.homepage-v2__trust {
    padding: 20px 28px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 6px 28px rgba(21, 21, 47, 0.06);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.homepage-v2__trust-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.homepage-v2__trust-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--hp2-brand-blue);
}

.homepage-v2__trust-item h3 {
    margin: 0 0 3px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--hp2-text-dark);
}

.homepage-v2__trust-item p {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.4;
    color: var(--hp2-text-muted);
}

.homepage-v2__legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 10px;
    font-size: 0.76rem;
    color: #8b93a1;
}

.homepage-v2__legal a {
    color: #8b93a1;
    text-decoration: none;
    font-weight: 600;
}

.homepage-v2__legal a:hover {
    color: var(--hp2-brand-blue);
    text-decoration: underline;
}

.homepage-v2__legal-sep {
    color: #c4cad4;
}

/* Short desktop viewports — whole page scrolls; login card keeps natural height */
@media (max-height: 849px) and (min-width: 961px) {
    html, body.homepage-v2-body {
        height: auto;
        overflow: auto;
    }

    .homepage-v2-page {
        height: auto;
        max-height: none;
        overflow: visible;
        min-height: 100dvh;
        grid-template-rows: auto auto auto;
    }

    .homepage-v2__main {
        min-height: auto;
        align-items: start;
    }

    .homepage-v2__login-card {
        margin-top: 0;
        align-self: start;
    }

    .homepage-v2__login-card-body {
        max-height: none;
        overflow-y: visible;
    }
}

/* Medium / short viewports — compaction when fixed layout still fits (850px+ tall) */
@media (min-height: 850px) and (max-height: 870px) {
    .homepage-v2__header {
        padding-top: 12px;
    }

    .homepage-v2__brand-logo {
        height: 38px;
    }

    .homepage-v2__hero h1 {
        margin: 10px 0;
        font-size: clamp(1.75rem, 3.5vw, 2.8rem);
    }

    .homepage-v2__login-card {
        padding: 22px 24px;
    }

    .homepage-v2__login-card-body {
        max-height: calc(100dvh - 170px);
    }

    .homepage-v2__help-link {
        top: 22px;
        right: 24px;
        font-size: 0.84rem;
    }

    .homepage-v2__trust {
        padding: 14px 18px;
        gap: 16px;
    }
}

@media (max-width: 1650px) {
    .homepage-v2__features {
        flex-wrap: wrap;
    }

    .homepage-v2__feature {
        white-space: normal;
    }
}

@media (max-width: 1250px) {
    .homepage-v2__showcase {
        display: none;
    }
}

@media (max-width: 960px) {
    html, body.homepage-v2-body {
        height: auto;
        overflow: auto;
    }

    .homepage-v2-page {
        height: auto;
        max-height: none;
        overflow: visible;
        grid-template-rows: auto auto auto;
        min-height: 100dvh;
        --hp2-inset-x: 8.5%;
    }

    .homepage-v2__header {
        justify-content: space-between;
        align-items: center;
        padding: 20px max(10px, var(--hp2-inset-x)) 0;
    }

    .homepage-v2__brand-tagline,
    .homepage-v2__hero,
    .homepage-v2__trust {
        display: none !important;
    }

    .homepage-v2__main {
        grid-template-columns: 1fr;
        padding: 20px max(10px, var(--hp2-inset-x)) 16px;
        gap: 0;
        align-items: start;
        min-height: auto;
    }

    .homepage-v2__login-card {
        max-width: 480px;
        width: 100%;
        margin: 0 auto;
        margin-top: 0;
        justify-self: center;
        max-height: none;
    }

    /* Let the page scroll — no inner card scrollbar on mobile. */
    .homepage-v2__login-card-body {
        max-height: none;
        overflow: visible;
    }

    .homepage-v2__bottom {
        padding: 0 max(10px, var(--hp2-inset-x)) 24px;
        margin-top: auto;
    }

    .homepage-v2__legal {
        padding-top: 0;
    }
}
