/* ============================================
   Sign-in / Landing Page
   ============================================ */

/* -- Fonts -- */
@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,62..124,100..900;1,62..124,100..900&family=Hanken+Grotesk:wght@300;400;500;600;700;800&display=swap');

/* -- Page reset -- */
/* login.html is standalone (no base.html), so reset the document itself —
   otherwise the browser's default 8px body margin shows the canvas colour
   (black in dark mode) as a frame around the page */
html, body {
    margin: 0;
    padding: 0;
    background: #f7efe8;
}

.login-page {
    font-family: 'Hanken Grotesk', sans-serif;
    background: #f7efe8;
    color: #26241f;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Exclude the Clerk widget subtree (#clerk-sign-in) — zeroing margin/padding
   there overrides Clerk's own spacing and flattens its buttons/inputs.
   :where() keeps specificity at (0,1,0) so the rest of the page is unchanged. */
.login-page *:where(:not(#clerk-sign-in *)),
.login-page *:where(:not(#clerk-sign-in *))::before,
.login-page *:where(:not(#clerk-sign-in *))::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* -- Top bar -- */
.login-topbar {
    height: 6px;
    background: #26241f;
    flex-shrink: 0;
}

/* -- Hero grid -- */
.login-hero {
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
    min-height: calc(100vh - 6px);
}

/* ============================================
   Left column — Marketing carousel
   ============================================ */

.login-carousel {
    background: #0b4135;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Header row */
.login-carousel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px 0;
}

.login-carousel__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-carousel__logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0d5142;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .02em;
    color: #7fd4bd;
}

.login-carousel__portal {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 19px;
    font-stretch: 108%;
    letter-spacing: .04em;
    color: #f7efe8;
}

/* What's new pill */
.login-carousel__pill {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.16);
    padding: 9px 16px 9px 13px;
}

.login-carousel__pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0566f;
    box-shadow: 0 0 0 4px rgba(224,86,111,0.25);
    flex-shrink: 0;
}

.login-carousel__pill-text {
    font-size: 13px;
    font-weight: 600;
    color: #f1ece4;
    white-space: nowrap;
}

/* Photo frame */
.login-carousel__frame {
    flex: 1;
    margin: 24px 40px 0;
    border-radius: 20px;
    overflow: hidden;
    background: #0d5142;
    box-shadow: 0 20px 50px rgba(0,0,0,0.28);
    outline: 1px solid rgba(255,255,255,0.08);
    outline-offset: -1px;
    position: relative;
}

.login-carousel__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 500ms ease;
}

.login-carousel__slide--active {
    opacity: 1;
}

.login-carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenBurns 12s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    from { transform: scale(1.02); }
    to   { transform: scale(1.12); }
}

/* Caption band */
.login-carousel__captions {
    padding: 26px 40px 20px;
    position: relative;
    height: 188px;
}

.login-carousel__caption {
    position: absolute;
    left: 40px;
    right: 40px;
    top: 26px;
    opacity: 0;
    transition: opacity 500ms ease;
}

.login-carousel__caption--active {
    opacity: 1;
}

.login-carousel__eyebrow {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #7fd4bd;
    margin-bottom: 10px;
}

.login-carousel__headline {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 46px;
    line-height: 1.02;
    letter-spacing: -.02em;
    font-stretch: 108%;
    color: #f7efe8;
    max-width: 13ch;
    margin-bottom: 12px;
    text-transform: none;
}

.login-carousel__headline .accent-dot {
    color: #e0566f;
}

.login-carousel__body {
    font-size: 16px;
    line-height: 1.5;
    color: #d8e6df;
    max-width: 44ch;
}

/* Dots */
.login-carousel__dots {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 40px 52px;
}

.login-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(247,239,232,0.38);
    border: none;
    cursor: pointer;
    transition: width .4s ease, background .4s ease;
    padding: 0;
}

.login-carousel__dot--active {
    width: 26px;
    background: #f7efe8;
}

/* ============================================
   Right column — Sign-in panel
   ============================================ */

.login-panel {
    background: #f7efe8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
    position: relative;
}

.login-panel__inner {
    width: 100%;
    max-width: 392px;
}

/* Panel states */
.login-panel__state {
    display: none;
}

.login-panel__state--active {
    display: block;
}

/* Eyebrow */
.login-panel__eyebrow {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #2f8f7a;
    margin-bottom: 14px;
}

.login-panel__eyebrow--crimson {
    color: #c23a5b;
}

/* Headings */
.login-panel h1 {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 46px;
    line-height: 1;
    letter-spacing: -.025em;
    font-stretch: 106%;
    color: #0b4135;
    margin-bottom: 14px;
    text-transform: none;
}

.login-panel h1 .accent-dot {
    color: #c23a5b;
}

.login-panel h1.login-panel__h1--sm {
    font-size: 42px;
}

.login-panel__sub {
    font-size: 16px;
    line-height: 1.55;
    color: #6f6a62;
    margin-bottom: 32px;
}

.login-panel__sub--sm {
    font-size: 15px;
}

/* Buttons */
.login-btn {
    display: block;
    width: 100%;
    padding: 17px;
    border-radius: 11px;
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background 150ms ease;
    text-decoration: none;
}

.login-btn:active {
    transform: translateY(1px);
}

.login-btn--primary {
    background: #0d5142;
    color: #eafff7;
}

.login-btn--primary:hover {
    background: #0b4135;
    color: #eafff7;
}

.login-btn--crimson {
    background: #c23a5b;
    color: #fff;
}

.login-btn--crimson:hover {
    background: #a82f4d;
    color: #fff;
}

.login-btn--secondary {
    background: transparent;
    border: 1.5px solid #cdbfae;
    color: #0d5142;
}

.login-btn--secondary:hover {
    border-color: #0d5142;
    background: #fbf6f0;
    color: #0d5142;
}

/* "or" divider */
.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2d8ca;
}

.login-divider span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #a89f92;
}

/* Form fields */
.login-field {
    margin-bottom: 18px;
}

.login-field__label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.login-field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #6f6a62;
}

.login-field__forgot {
    font-size: 13px;
    font-weight: 600;
    color: #0d5142;
    text-decoration: none;
    transition: color 150ms ease;
}

.login-field__forgot:hover {
    color: #c23a5b;
}

.login-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e0d6c8;
    border-radius: 10px;
    background: #fff;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 15px;
    color: #26241f;
    outline: none;
    transition: border-color 150ms ease;
}

.login-input::placeholder {
    color: #a89f92;
}

.login-input:focus {
    border-color: #0d5142;
}

.login-input--tight {
    padding: 13px 15px;
}

/* Checkbox */
.login-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.login-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0d5142;
}

.login-checkbox label {
    font-size: 14px;
    font-weight: 400;
    color: #6f6a62;
    text-transform: none;
    letter-spacing: normal;
}

/* Two-column row */
.login-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Back link */
.login-back {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #6f6a62;
    text-decoration: none;
    transition: color 150ms ease;
}

.login-back:hover {
    color: #0d5142;
}

/* Clerk mount container */
.login-clerk-mount {
    margin-top: 8px;
}

/* Backstop for Clerk internals the appearance API doesn't reach —
   keep the widget flat and chrome-free inside the panel.
   Scoped to #panel-signin because Clerk replaces the mount
   element's classes with its own (.cl-rootBox etc.) on mount. */
#panel-signin .cl-rootBox,
#panel-signin .cl-cardBox {
    width: 100%;
    box-shadow: none;
    border: none;
}

#panel-signin .cl-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

#panel-signin .cl-header {
    display: none;
}

#panel-signin .cl-footer {
    background: transparent;
}

#panel-signin .cl-footerAction {
    display: none;
}

/* Clerk pins inputs to a fixed 36px height/max-height that squashes the
   padding — let them size from padding like the rest of the page's fields */
#panel-signin .cl-formFieldInput {
    height: auto;
    max-height: none;
    padding: 14px 16px;
}

/* Flash / error messages */
.login-flash {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

.login-flash--error {
    background: #fef2f4;
    color: #c23a5b;
    border: 1px solid rgba(194,58,91,0.2);
}

.login-flash--success {
    background: #f0faf7;
    color: #0d5142;
    border: 1px solid rgba(13,81,66,0.2);
}

/* ============================================
   Content band
   ============================================ */

.login-band {
    border-top: 1px solid #e6dccd;
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 40px 70px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 64px;
}

/* Section header */
.login-section__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.login-section__title {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #0b4135;
}

.login-section__link {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #2f8f7a;
    text-decoration: none;
    transition: color 150ms ease;
}

.login-section__link:hover {
    color: #c23a5b;
}

/* Market cards */
.login-markets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.login-market-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(11,65,53,0.07);
}

.login-market-card__img {
    height: 118px;
    overflow: hidden;
}

.login-market-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-market-card__img--placeholder {
    background: #0d5142;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7fd4bd;
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.login-market-card__body {
    padding: 15px 16px 17px;
}

.login-market-card__day {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #c23a5b;
    margin-bottom: 4px;
}

.login-market-card__name {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #0b4135;
    margin-bottom: 3px;
}

.login-market-card__meta {
    font-size: 13px;
    color: #8a8275;
}

/* Notices */
.login-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #e9e0d2;
}

.login-notice:last-child {
    border-bottom: none;
}

.login-notice__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.login-notice__content {
    flex: 1;
}

.login-notice__title {
    font-size: 15px;
    font-weight: 600;
    color: #26241f;
    margin-bottom: 2px;
}

.login-notice__meta {
    font-size: 13px;
    color: #9a9183;
}

/* Support callout */
.login-support {
    background: #0b4135;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.login-support__text {
    font-size: 14px;
    color: #d8e6df;
}

.login-support__link {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #7fd4bd;
    text-decoration: none;
    transition: color 150ms ease;
    white-space: nowrap;
}

.login-support__link:hover {
    color: #fff;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 960px) {
    .login-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-carousel {
        min-height: 380px;
        max-height: 420px;
    }

    .login-carousel__headline {
        font-size: 32px;
    }

    .login-carousel__captions {
        height: 150px;
    }

    .login-panel {
        padding: 48px 32px;
    }

    .login-band {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 24px 50px;
    }

    .login-markets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .login-carousel__header {
        padding: 20px 24px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .login-carousel__frame {
        margin: 16px 24px 0;
    }

    .login-carousel__captions {
        padding: 20px 24px 16px;
    }

    .login-carousel__caption {
        left: 24px;
        right: 24px;
        top: 20px;
    }

    .login-carousel__dots {
        padding: 0 24px 32px;
    }

    .login-panel {
        padding: 40px 24px;
    }

    .login-panel h1 {
        font-size: 36px;
    }

    .login-markets {
        grid-template-columns: 1fr;
    }

    .login-field-row {
        grid-template-columns: 1fr;
    }
}
