@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&family=Public+Sans:wght@100..900&family=Work+Sans:wght@100..900&display=swap');

/* Hide global header/footer on auth pages */
header,
footer.site-footer {
    display: none !important;
}

main#main {
    padding: 0 !important;
    margin: 0 !important;
}

/* Login Page - Heritage Chronicle Design System */

:root {
    --bn-primary: #001c0b;
    --bn-secondary: #80560e;
    --bn-accent: #fec575;
    --bn-bg: #faf9f6;
    --bn-surface: #ffffff;
    --bn-text: #1a1c1a;
    --bn-text-dim: #424842;
    --bn-outline: rgba(114, 121, 113, 0.15);

    --bn-serif: 'Newsreader', serif;
    --bn-sans: 'Public Sans', sans-serif;
    --bn-label: 'Work Sans', sans-serif;


}

.auth-page {
    display: flex;
    min-height: 100vh;
    width: 100%;
    font-family: var(--pr-font-body);
    background-color: var(--bn-bg);
}

/* --- Atmospheric Side --- */
.auth-hero {
    display: none;
    position: relative;
    width: 50%;
    flex-direction: column;
    justify-content: flex-end;
    padding: 8rem;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .auth-hero {
        display: flex;
    }
}

.auth-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.auth-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* filter: grayscale(20%) brightness(0.4); */
}

.auth-hero__overlay {
    position: absolute;
    inset: 0;
    /* background: rgba(0, 28, 11, 0.4); */
    /* backdrop-filter: blur(2px); */
    z-index: 1;
}

.auth-hero__content {
    position: relative;
    z-index: 10;
    max-width: 48rem;
}

.auth-hero__brand {
    font-family: var(--pr-font-headline);
    font-weight: 700;
    font-size: 3.2rem;
    color: #ffffff;
    letter-spacing: -0.05em;
    margin-bottom: 6.4rem;
    display: block;
}

.auth-hero__quote {
    border-left: 0.4rem solid var(--bn-secondary);
    padding-left: 3.2rem;
}

.auth-hero__quote-text {
    font-family: var(--pr-font-headline);
    font-style: italic;
    font-size: 3.6rem;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.auth-hero__quote-author {
    margin-top: 2.4rem;
    font-family: var(--bn-label);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 1.1rem;
    color: var(--bn-accent);
    opacity: 0.8;
}

/* --- Form Side --- */
.auth-main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.2rem;
    background-color: var(--bn-bg);
}

@media (min-width: 1024px) {
    .auth-main {
        width: 50%;
    }
}

.auth-form-container {
    width: 100%;
}

.auth-header {
    margin-bottom: 2.8rem;
}

.auth-header__mobile-brand {
    display: block;
    text-align: center;
    margin-bottom: 6.4rem;
}

@media (min-width: 1024px) {
    .auth-header__mobile-brand {
        display: none;
    }
}

.auth-header__title {
    font-family: var(--pr-font-headline);
    font-size: 3.2rem;
    color: var(--bn-primary);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.auth-header__subtitle {
    font-size: 1.6rem;
    color: var(--bn-text-dim);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 3.2rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
}

.auth-field__label-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.auth-field__label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--bn-text-dim);
}

.auth-field__link {
    font-family: var(--bn-label);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bn-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.auth-field__link:hover {
    text-decoration: underline;
    text-underline-offset: 0.4rem;
}

.auth-field__input {
    width: 100%;
    padding: 1.2rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--bn-outline);
    font-family: var(--pr-font-body);
    font-size: 1.6rem;
    color: var(--bn-text);
    transition: all 0.3s ease;
}

.auth-field__input::placeholder {
    color: rgba(66, 72, 66, 0.4);
}

.auth-field__input:focus {
    outline: none;
    border-bottom-color: var(--bn-secondary);
}

/* --- Submit Button --- */
.auth-submit-btn {
    width: 100%;
    padding: 1.2rem 2.4rem;
    /* margin-top: 1.6rem; */
    background: linear-gradient(135deg, #001c0b 0%, #0f321c 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.8rem;
    font-family: var(--bn-label);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 2rem 4rem -1rem rgba(0, 28, 11, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-submit-btn:hover {
    transform: translateY(-0.4rem);
    box-shadow: 0 3rem 6rem -1.5rem rgba(0, 28, 11, 0.3);
    opacity: 0.95;
}

.auth-submit-btn:active {
    transform: translateY(-0.1rem);
}

/* --- Divider --- */
.auth-divider {
    position: relative;
    display: flex;
    align-items: center;
    padding: 3.2rem 0;
}

.auth-divider__line {
    flex-grow: 1;
    height: 1px;
    background: rgba(114, 121, 113, 0.1);
}

.auth-divider__text {
    padding: 0 1.6rem;
    font-family: var(--bn-label);
    font-size: 0.9rem;
    color: var(--bn-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    white-space: nowrap;
    opacity: 0.6;
}

/* --- Social Buttons --- */
.auth-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.6rem;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 1.4rem;
    background: #f4f3f1;
    border: none;
    border-radius: 0.8rem;
    font-family: var(--bn-label);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bn-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-social-btn:hover {
    background: #e9e8e5;
}

.auth-social-btn svg {
    width: 2rem;
    height: 2rem;
}

/* --- Footer --- */
.auth-footer {
    margin-top: 6.4rem;
    text-align: center;
}

.auth-footer__text {
    font-size: 1.4rem;
    color: var(--bn-text-dim);
}

.auth-footer__link {
    font-weight: 700;
    color: var(--bn-secondary);
    text-decoration: none;
    margin-left: 0.4rem;
}

.auth-footer__link:hover {
    text-decoration: underline;
}

/* --- Absolute Bottom Footer --- */
.auth-bottom {
    position: absolute;
    bottom: 3.2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 3.2rem;
}

.auth-bottom__link {
    font-family: var(--bn-label);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--bn-text-dim);
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.auth-bottom__link:hover {
    opacity: 1;
    color: var(--bn-primary);
}

/* --- Card-style Login Context (for embeds in master layout) --- */
.auth-wrapper {
    background-color: var(--bn-bg);
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6.4rem 0;
}

.auth-card {
    display: flex;
    width: 100%;
    background: #ffffff;
    border-radius: 1.6rem;
    overflow: hidden;
    box-shadow: 0 4rem 8rem -2rem rgba(0, 28, 11, 0.08);
    min-height: 60rem;
    margin: 0 auto;
    /* max-width: 1000px; */
}

.auth-card .auth-hero {
    width: 54%;
    padding: 4.8rem;
}

.auth-card .auth-main {
    width: 46%;
    /* Adjusted to complement hero width */
    padding: 2.8rem;
    position: relative;
    background-color: #ffffff;
}

.auth-form--register {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 3.2rem;
}

.auth-field--full {
    grid-column: span 2;
}

@media (max-width: 1023px) {
    .auth-card {
        flex-direction: column;
    }

    .auth-card .auth-hero {
        display: none;
    }

    .auth-card .auth-main {
        width: 100%;
        padding: 3.2rem;
    }

    .auth-form--register {
        grid-template-columns: 1fr;
    }

    .auth-field--full {
        grid-column: span 1;
    }

    .auth-card {
        min-height: auto;
    }

    .auth-wrapper {
        padding: 2rem 0 7rem;
    }

    .auth-form {
        gap: 2rem;
    }
}