/**
 * RSVP landing page
 * Template: templates/rsvp.php
 */

.rsvp-section {
    --rsvp-navy: #1B214A;
    --rsvp-plum: #621F52;
    --rsvp-button: #2F305D;
    --rsvp-success: #4AAA44;
    --header-h: 80px;

    font-family: var(--font-Poppins);
    color: var(--rsvp-navy);
}

/* Content column: 1574px, centred. */
.rsvp-section > .container {
    max-width: 1604px;
}

.rsvp-heading {
    font-size: 40px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--rsvp-navy);
    margin: 0 0 63px;
}

.rsvp-body,
.rsvp-body p {
    font-size: 14px;
    line-height: 1.3;
    color: var(--rsvp-navy);
}

.rsvp-body p {
    margin: 0 0 18px;
}

.rsvp-body p:last-child {
    margin-bottom: 0;
}

.rsvp-body strong {
    font-weight: 600;
}

/* ----------------------------------------------------------------- Hero */
/* 386px band under the 80px overlay header. Wordmark 707px at the column
   edge, line art 727px on the right, both bottom-aligned 17px above the
   band's bottom. */
.rsvp-hero {
    position: relative;
    overflow: hidden;
    min-height: 386px;
    padding: calc(var(--header-h) + 18px) 0 17px;
    display: flex;
    align-items: flex-end;
}

.rsvp-hero .container {
    width: 100%;
}

.rsvp-hero__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.rsvp-hero__wordmark {
    flex: 0 1 45%;
    max-width: 707px;
    margin: 0;
}

.rsvp-hero__wordmark img,
.rsvp-hero__line-art img {
    display: block;
    width: 100%;
    height: auto;
}

.rsvp-hero__line-art {
    flex: 0 1 46%;
    max-width: 727px;
}

/* ----------------------------------------------------------- Invitation */
/* Copy 570px | 91px gutter | card 913px, tops aligned 70px below the hero. */
.rsvp-invite {
    position: relative;
    padding: 70px 0 120px;
    overflow-x: clip;   /* the plate bleeds 10px past the edge; clip without a scroll container */
}

.rsvp-invite__inner {
    display: grid;
    grid-template-columns: minmax(0, 570fr) minmax(0, 913fr);
    column-gap: 91px;
    align-items: start;
}

.rsvp-invite__copy {
    max-width: 570px;
}

/* Prawn plate: 337x593 bleeding 10px off the right, over the card. */
.rsvp-invite__side-image {
    position: absolute;
    top: 70px;
    right: -10px;
    height: 593px;
    z-index: 2;
    pointer-events: none;
}

.rsvp-invite__side-image img {
    display: block;
    height: 100%;
    width: auto;
    filter: drop-shadow(-15px 24px 14px rgba(0, 0, 0, 0.03));
}

/* ------------------------------------------------------------ Form card */
.rsvp-form {
    position: relative;
    z-index: 1;
    background-color: #F6F6F6;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
    padding: 89px 44px 40px 47px;
    min-height: 578px;
}

.rsvp-form__intro {
    margin: 0 0 41px;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 300;
    letter-spacing: -0.03em;
    color: var(--rsvp-plum);
}

.rsvp-form .wpcf7 form {
    max-width: 655px;
}

/* Two 213px columns, 138px apart; rows 98px apart (30px field + 68px). */
.rsvp-form__fields {
    display: grid;
    grid-template-columns: 213px 213px;
    column-gap: 138px;
    row-gap: 68px;
    margin-left: 5px;
}

.rsvp-form .form-group {
    position: relative;
}

.rsvp-form .wpcf7-form-control-wrap {
    display: block;
}

.rsvp-form .form-group input {
    display: block;
    width: 100%;
    height: 30px;
    padding: 0;
    margin: 0;
    border: 0;
    border-bottom: 1px solid #000000;
    border-radius: 0;
    background: transparent;
    outline: none;
    font-family: var(--font-Poppins);
    font-size: 15px;
    line-height: 22px;
    font-weight: 300;
    letter-spacing: -0.03em;
    color: var(--rsvp-navy);
}

.rsvp-form .form-group input::placeholder {
    color: #797979;
    -webkit-text-fill-color: #797979;   /* theme sets text-fill on inputs; it overrides color at paint time */
    opacity: 1;
}

.rsvp-form .form-group input:focus {
    border-bottom-color: var(--rsvp-plum);
}

.rsvp-form .form-group input.wpcf7-not-valid {
    border-bottom-color: #FA3333;
}

.rsvp-form .wpcf7-not-valid-tip {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 4px;
    white-space: nowrap;
}

/* 655x48 navy bar, label left, corner arrow right. */
.rsvp-form .btn-wrapper {
    margin-top: 28px;
}

.rsvp-form .rsvp-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 48px;
    padding: 0 17px 0 16px;
    border: 0;
    border-radius: 0;
    background-color: var(--rsvp-button);
    color: #ffffff;
    font-family: var(--font-Poppins);
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    letter-spacing: -0.03em;
    text-transform: none;   /* theme upper-cases buttons globally */
    cursor: pointer;
    transition: background-color .3s ease;
}

.rsvp-form .rsvp-submit:hover,
.rsvp-form .rsvp-submit:focus-visible {
    background-color: var(--rsvp-navy);
}

.rsvp-form .rsvp-submit svg {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    color: #ffffff;
    transition: transform .3s ease;
}

.rsvp-form .rsvp-submit:hover svg {
    transform: translate(3px, -3px);
}

.rsvp-form .wpcf7-spinner {
    position: absolute;
    right: -36px;
    bottom: 12px;
    margin: 0;
}

/* Native CF7 response output, restyled as a 655x70 outlined box. */
.rsvp-form .wpcf7 form .wpcf7-response-output {
    margin: 21px 0 0;
    padding: 8px 16px;
    border: 2px solid var(--rsvp-success);
    font-size: 14px;
    line-height: 1.3;
    color: var(--rsvp-navy);
    min-height: 70px;
    display: flex;
    align-items: center;
}

.rsvp-form .wpcf7 form.init .wpcf7-response-output,
.rsvp-form .wpcf7 form.submitting .wpcf7-response-output {
    display: none;
}

.rsvp-form .wpcf7 form.sent .wpcf7-response-output {
    border-color: var(--rsvp-success);
}

.rsvp-form .wpcf7 form.invalid .wpcf7-response-output,
.rsvp-form .wpcf7 form.unaccepted .wpcf7-response-output,
.rsvp-form .wpcf7 form.failed .wpcf7-response-output,
.rsvp-form .wpcf7 form.aborted .wpcf7-response-output,
.rsvp-form .wpcf7 form.spam .wpcf7-response-output {
    border-color: #FA3333;
}


/* --------------------------------------------------------- Breakpoints */
@media (max-width: 1600px) {
    .rsvp-invite__side-image {
        height: 480px;
    }
}

@media (max-width: 1280px) {
    .rsvp-invite__inner {
        column-gap: 50px;
    }

    .rsvp-form {
        padding: 60px 32px 40px;
    }

    .rsvp-form__fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 40px;
        row-gap: 44px;
        margin-left: 0;
    }

    .rsvp-invite__side-image {
        height: 380px;
    }
}

@media (max-width: 1024px) {
    .rsvp-heading {
        font-size: 30px;
        margin-bottom: 30px;
    }

    .rsvp-hero {
        min-height: 0;
        padding: calc(var(--header-h) + 30px) 0 30px;
    }

    .rsvp-hero__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .rsvp-hero__wordmark,
    .rsvp-hero__line-art {
        flex-basis: auto;
        width: 100%;
    }

    .rsvp-hero__wordmark {
        max-width: 520px;
    }

    .rsvp-hero__line-art {
        max-width: 560px;
        align-self: flex-end;
    }

    .rsvp-invite {
        padding: 50px 0 80px;
    }

    .rsvp-invite__inner {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }

    .rsvp-invite__copy {
        max-width: 640px;
    }

    .rsvp-invite__side-image {
        display: none;
    }

    .rsvp-form {
        min-height: 0;
    }

    .rsvp-form__intro {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .rsvp-heading {
        font-size: 26px;
    }

    .rsvp-form {
        padding: 40px 20px 32px;
    }

    .rsvp-form__intro {
        font-size: 18px;
    }

    .rsvp-form .wpcf7-spinner {
        right: 0;
        bottom: -28px;
    }
}

@media (max-width: 600px) {
    .rsvp-form__fields {
        grid-template-columns: 1fr;
        row-gap: 36px;
    }
}
