/* Femme Pen Chronicles additions on top of Casper

This file is loaded as-is after built/screen.css, so it can be edited
directly without running the gulp build.

1. Footer
2. Contact page
3. Dark mode

*/


/* 1. Footer
/* ---------------------------------------------------------- */

.fp-footer {
    margin-top: max(12vmin, 64px);
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.5rem;
    line-height: 1.6;
    background: #0a0b0c;
}

.page-template .fp-footer {
    margin-top: 0;
}

.fp-footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.fp-footer a:hover {
    color: #fff;
    text-decoration: none;
}

.fp-footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 48px max(4vmin, 32px);
    padding: max(8vmin, 56px) 0 max(6vmin, 48px);
}

.fp-footer-logo {
    display: inline-block;
    font-family: var(--gh-font-heading, var(--font-sans));
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.fp-footer .fp-footer-logo {
    color: #fff;
}

.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .fp-footer-logo {
    font-family: var(--gh-font-heading, var(--font-serif));
}

.fp-footer-logo img {
    display: block;
    max-height: 48px;
    width: auto;
}

.fp-footer-description {
    margin: 12px 0 0;
    max-width: 320px;
}

.fp-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.fp-footer-social:not(:has(a)) {
    display: none;
}

.fp-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.fp-footer-social a:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.fp-footer-social .icon {
    width: 18px;
    height: 18px;
}

.fp-footer-heading {
    margin: 0 0 18px;
    color: #fff;
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.fp-footer-explore .nav {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fp-footer-explore .nav li {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.fp-footer-text {
    margin: 0 0 18px;
}

.fp-footer-form-row {
    display: flex;
    gap: 8px;
}

.fp-footer-form input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    color: #fff;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease;
}

.fp-footer-form input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.fp-footer-form input:focus {
    border-color: rgba(255, 255, 255, 0.6);
}

.fp-footer-form button {
    flex-shrink: 0;
    height: 46px;
    padding: 0 20px;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--ghost-accent-color);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.fp-footer-form button:hover {
    opacity: 0.9;
}

.fp-footer-form.loading button {
    opacity: 0.6;
    pointer-events: none;
}

.fp-footer-form-success,
.fp-footer-form-error {
    display: none;
    margin: 12px 0 0;
    font-size: 1.4rem;
}

.fp-footer-form.success .fp-footer-form-row {
    display: none;
}

.fp-footer-form.success .fp-footer-form-success {
    display: block;
    margin-top: 0;
    color: #fff;
}

.fp-footer-form.error .fp-footer-form-error {
    display: block;
    color: #ff8a73;
}

.fp-footer-account {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Bottom bar: copyright and secondary navigation (legal pages) */

.fp-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px 32px;
    padding: 24px 0 max(4vmin, 32px);
    font-size: 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.fp-footer-copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
}

.fp-footer-legal .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fp-footer-legal .nav li {
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

@media (max-width: 991px) {
    .fp-footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fp-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .fp-footer-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .fp-footer-bottom {
        flex-direction: column-reverse;
        align-items: flex-start;
        /* Room for the floating Portal subscribe button */
        padding-bottom: 96px;
    }
}


/* 2. Contact page
/* ---------------------------------------------------------- */

/* Casper adds a large margin after the last paragraph of a page,
here the form follows the text instead */
.fp-contact .gh-content > *:last-child:not(.kg-width-full) {
    margin-bottom: 0;
}

/* 980px = 130px label column + 720px text column + 130px, so on desktop
the inputs line up with the text above */
.fp-contact-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: max(5vmin, 32px) 56px;
    align-items: start;
    max-width: calc(980px + 2 * max(4vmin, 20px));
    margin: max(6vmin, 40px) auto 0;
    padding: 0 max(4vmin, 20px) max(12vmin, 72px);
}

.fp-contact-body.has-image {
    grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
}

.fp-contact-field {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 22px;
}

.fp-contact-field label {
    padding-top: 13px;
    color: var(--color-darkgrey);
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-align: right;
    text-transform: uppercase;
}

.fp-contact-field input,
.fp-contact-field textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    color: var(--color-darkgrey);
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.6rem;
    line-height: 1.5;
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fp-contact-field textarea {
    min-height: 180px;
    resize: vertical;
}

.fp-contact-field input::placeholder {
    color: var(--color-secondary-text);
}

.fp-contact-field input:focus,
.fp-contact-field textarea:focus {
    border-color: var(--color-darkgrey);
    box-shadow: 0 0 0 3px rgba(21, 23, 26, 0.08);
}

.fp-contact-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.fp-contact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-left: 130px;
}

.fp-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 34px;
    color: #fff;
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: var(--color-darkgrey);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.fp-contact-button:hover {
    opacity: 0.85;
}

.fp-contact-button:disabled {
    opacity: 0.5;
    cursor: default;
}

.fp-contact-status {
    flex: 1 1 220px;
    margin: 0;
    color: var(--color-midgrey);
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.5rem;
}

.fp-contact-status:empty {
    display: none;
}

.fp-contact-form.is-error .fp-contact-status {
    color: var(--color-red);
}

/* Once sent, only the thank-you message stays */
.fp-contact-form.is-sent .fp-contact-field,
.fp-contact-form.is-sent .fp-contact-button {
    display: none;
}

.fp-contact-form.is-sent .fp-contact-actions {
    margin-left: 0;
}

.fp-contact-form.is-sent .fp-contact-status {
    padding: 20px 24px;
    color: var(--color-darkgrey);
    font-size: 1.7rem;
    background: var(--color-lightgrey);
    border-radius: 6px;
}

.fp-contact-missing {
    margin: 0;
    padding: 20px 24px;
    color: var(--color-darkgrey);
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.5rem;
    background: #fff6e0;
    border: 1px solid var(--color-yellow);
    border-radius: 6px;
}

.fp-contact-image {
    margin: 0;
}

.fp-contact-image img {
    display: block;
    width: 100%;
    height: auto;
}

.fp-contact-image figcaption {
    margin-top: 10px;
    color: var(--color-secondary-text);
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.3rem;
    text-align: center;
}

@media (max-width: 991px) {
    .fp-contact-body.has-image {
        grid-template-columns: minmax(0, 1fr);
    }

    .fp-contact-image {
        max-width: 420px;
    }
}

@media (max-width: 767px) {
    .fp-contact-field {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        margin-bottom: 18px;
    }

    .fp-contact-field label {
        padding-top: 0;
        text-align: left;
    }

    .fp-contact-actions {
        margin-left: 0;
    }

    .fp-contact-button {
        width: 100%;
    }
}


/* 3. Dark mode
/* ---------------------------------------------------------- */

html.dark-mode .fp-contact-field label {
    color: rgba(255, 255, 255, 0.9);
}

html.dark-mode .fp-contact-field input,
html.dark-mode .fp-contact-field textarea {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

html.dark-mode .fp-contact-button {
    color: var(--color-darkgrey);
    background: #fff;
}

html.dark-mode .fp-contact-form.is-sent .fp-contact-status {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
    html.auto-color .fp-contact-field label {
        color: rgba(255, 255, 255, 0.9);
    }

    html.auto-color .fp-contact-field input,
    html.auto-color .fp-contact-field textarea {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.15);
    }

    html.auto-color .fp-contact-button {
        color: var(--color-darkgrey);
        background: #fff;
    }

    html.auto-color .fp-contact-form.is-sent .fp-contact-status {
        color: #fff;
        background: rgba(255, 255, 255, 0.08);
    }
}
