/* ABOUTME: Studio-style contact page — dark canvas, oversized serif headline, underline form fields. */
/* ABOUTME: Styles the [wsllc_contact_page] shortcode, incl. scoped Contact Form 7 overrides. */

/* ── Page canvas: kill The7's content padding so the dark section meets the header ── */
body.wsllc-contact-page #main {
    padding: 0 !important;
    background: #191b1f;
}
body.wsllc-contact-page #content > .wpb-content-wrapper > .vc_row:first-child {
    padding-top: 0 !important;
}

/* ── Chrome-less page: hide The7's navbar + footer; the page brings its own logo.
   (Footer is also suppressed server-side via _dt_footer_show=0 postmeta — this is
   the belt-and-suspenders for anything The7 still prints.) ── */
body.wsllc-contact-page .masthead,
body.wsllc-contact-page .header-space,
body.wsllc-contact-page .dt-mobile-header,
body.wsllc-contact-page #footer,
body.wsllc-contact-page #bottom-bar {
    display: none !important;
}

/* ── Home-link logo, in-flow above the headline, left-aligned with it ── */
.wsllc-contact__logo {
    display: inline-block;
    width: 180px;
    margin: 0 0 clamp(40px, 6vh, 72px);
    transition: opacity 0.3s ease;
}
.wsllc-contact__logo:hover {
    opacity: 0.75;
}
.wsllc-contact__logo img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Section shell ── */
.wsllc-contact {
    --wc-bg: #191b1f;
    --wc-ink: #f3f2f0;
    --wc-muted: #9aa1ab;
    --wc-accent: #ca511d;
    --wc-error: #e2725b;
    --wc-hairline: rgba(243, 242, 240, 0.16);
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: var(--wc-bg);
    color: var(--wc-ink);
    padding-top: clamp(44px, 7vh, 80px);
    font-size: 16px;
    line-height: 1.6;
}

.wsllc-contact__inner {
    display: flex;
    gap: 40px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}
.wsllc-contact__main {
    flex: 1 1 auto;
    min-width: 0;
}

/* ── Sticky vertical rail ── */
.wsllc-contact__rail {
    flex: 0 0 auto;
    /* start the label level with the "Where" row: logo height (103px at its
       fixed 180px width) + the logo's bottom margin + 7px optical correction
       for the vertical text's line box */
    padding-top: calc(110px + clamp(40px, 6vh, 72px));
}
.wsllc-contact__rail-text {
    position: sticky;
    top: 140px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    writing-mode: vertical-rl;
    font-size: 12px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--wc-muted);
}
.wsllc-contact__rail-text::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wc-accent);
}

/* ── Headline ── */
.wsllc-contact__title {
    margin: 0 0 34px;
    /* The7 draws the divider under the headline as the h1's border-bottom; the
       padding drops it below the descender of the 'g' (line-height 1.02 alone
       leaves the glyph poking through the line) */
    padding-bottom: 0.22em;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-weight: 400;
    font-size: clamp(58px, 9.5vw, 138px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: var(--wc-ink);
}
.wsllc-contact__line {
    display: block;
}
.wsllc-contact__char {
    position: relative;
    display: inline-block;
    will-change: transform, opacity;
}
.wsllc-contact__dot {
    display: inline-block;
    width: 0.13em;
    height: 0.13em;
    margin-left: 0.12em;
    border-radius: 50%;
    background: var(--wc-accent);
}

.wsllc-contact__lede {
    max-width: 540px;
    margin: 0 0 clamp(48px, 7vh, 84px);
    font-size: 17px;
    color: var(--wc-muted);
}

/* ── Form (Contact Form 7 overrides, scoped) ── */
/* The form spans the main column; field rows stay at 640px while the submit
   pill sits absolutely at the column's bottom-right, clear of the fields */
.wsllc-contact .wpcf7 form {
    position: relative;
}
.wsllc-contact .wpcf7 form > p {
    max-width: 640px;
    margin: 0 0 42px;
}
.wsllc-contact .wpcf7 form > p:last-of-type {
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 0;
    /* flex sizes the p to the pill (a bare inline input overflows the p's line
       box and hangs below the form edge) and lets the spinner anchor off it */
    display: flex;
    align-items: center;
}
.wsllc-contact .wpcf7 label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--wc-muted);
}
.wsllc-contact .wpcf7-form-control-wrap {
    display: block;
    margin-top: 4px;
}
.wsllc-contact .wpcf7 input[type="text"],
.wsllc-contact .wpcf7 input[type="email"],
.wsllc-contact .wpcf7 input[type="tel"],
.wsllc-contact .wpcf7 textarea {
    width: 100%;
    padding: 12px 0 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--wc-hairline);
    border-radius: 0;
    box-shadow: none;
    font-size: 17px;
    line-height: 1.5;
    color: var(--wc-ink);
    transition: border-color 0.3s ease;
}
.wsllc-contact .wpcf7 input[type="text"]:focus,
.wsllc-contact .wpcf7 input[type="email"]:focus,
.wsllc-contact .wpcf7 input[type="tel"]:focus,
.wsllc-contact .wpcf7 textarea:focus {
    outline: none;
    border-bottom-color: var(--wc-accent);
}
.wsllc-contact .wpcf7 textarea {
    height: 140px;
    resize: vertical;
}

/* Dark-canvas autofill: keep Chrome from painting fields pale yellow */
.wsllc-contact .wpcf7 input:-webkit-autofill,
.wsllc-contact .wpcf7 textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--wc-bg) inset;
    -webkit-text-fill-color: var(--wc-ink);
    caret-color: var(--wc-ink);
}

/* File field — !important strips The7's white input box (bg/border/radius/height)
   so only the compact pill button + filename text remain on the dark canvas */
.wsllc-contact .wpcf7 input[type="file"] {
    width: auto;
    max-width: 100%;
    height: auto !important;
    margin-top: 14px;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 13px;
    color: var(--wc-muted);
}
.wsllc-contact .wpcf7 input[type="file"]::file-selector-button {
    margin-right: 16px;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid var(--wc-hairline);
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--wc-ink);
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease;
}
.wsllc-contact .wpcf7 input[type="file"]::file-selector-button:hover {
    border-color: var(--wc-accent);
    color: var(--wc-accent);
}

/* Submit — !important fights The7's generated button CSS (accent bg + var() padding/radius
   via high-specificity :not() selectors in uploads/the7-css/custom.css) */
.wsllc-contact input.wpcf7-submit {
    margin-top: 8px;
    /* side padding matches the vertical padding so the pill hugs the text */
    padding: 17px 20px !important;
    background: transparent !important;
    border: 1px solid rgba(243, 242, 240, 0.35) !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    color: var(--wc-ink) !important;
    cursor: pointer;
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}
.wsllc-contact input.wpcf7-submit:hover,
.wsllc-contact input.wpcf7-submit:focus-visible {
    background: var(--wc-accent) !important;
    border-color: var(--wc-accent) !important;
    color: #fff !important;
}
/* CF7's spinner span always reserves space — park it left of the pill so the
   button stays flush right; it becomes visible there while submitting */
.wsllc-contact .wpcf7-spinner {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

/* Validation + response messages */
.wsllc-contact .wpcf7-not-valid-tip {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--wc-error);
}
.wsllc-contact .wpcf7 input.wpcf7-not-valid,
.wsllc-contact .wpcf7 textarea.wpcf7-not-valid {
    border-bottom-color: var(--wc-error);
}
.wsllc-contact .wpcf7-response-output {
    max-width: 640px;
    margin: 34px 0 0 !important;
    padding: 14px 20px !important;
    border: 1px solid var(--wc-hairline) !important;
    font-size: 14px;
    color: var(--wc-ink);
}
.wsllc-contact .wpcf7 form.sent .wpcf7-response-output {
    border-color: var(--wc-accent) !important;
}
.wsllc-contact .wpcf7 form.invalid .wpcf7-response-output,
.wsllc-contact .wpcf7 form.failed .wpcf7-response-output {
    border-color: var(--wc-error) !important;
}

/* ── Info strip ── */
.wsllc-contact__info {
    margin-top: clamp(70px, 10vh, 130px);
    border-top: 1px solid var(--wc-hairline);
}
.wsllc-contact__info-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(44px, 6vh, 70px) 32px clamp(64px, 9vh, 110px);
}
.wsllc-contact__info-head {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--wc-muted);
}
.wsllc-contact__info-col p {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
    color: var(--wc-ink);
}
.wsllc-contact__info-col a {
    color: var(--wc-ink);
    text-decoration: none;
    border-bottom: 1px solid var(--wc-hairline);
    transition: color 0.3s ease, border-color 0.3s ease;
}
.wsllc-contact__info-col a:hover {
    color: var(--wc-accent);
    border-color: var(--wc-accent);
}
.wsllc-contact__clock {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 26px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
.wsllc-contact__clock-place {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--wc-muted);
}

/* Credits — same .wsllc-credits roll-over component as the site footer
   (generic styles in wsllc-global.css); only recolored for the dark canvas */
.wsllc-contact__info-col p.wsllc-contact__credits {
    margin-top: 18px;
    font-size: 12px;
    letter-spacing: 1.5px;
}
.wsllc-contact__info-col a.wsllc-credits {
    border-bottom: none;
    color: var(--wc-muted);
}
.wsllc-contact__info-col a.wsllc-credits:hover,
.wsllc-contact__info-col a.wsllc-credits:focus {
    color: var(--wc-accent);
}

/* ── Reveal animation (armed by JS so no-JS visitors see everything) ── */
.wsllc-contact.is-armed .wsllc-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--wc-delay, 0s);
}
.wsllc-contact.is-armed .wsllc-reveal.is-inview {
    opacity: 1;
    transform: none;
}
/* Headline: per-character reveal — each char slides up into place with a
   left-to-right stagger (delays set inline per char by the shortcode markup) */
.wsllc-contact.is-armed .wsllc-contact__char,
.wsllc-contact.is-armed .wsllc-contact__dot {
    opacity: 0;
    transform: translateY(0.45em);
    transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--wc-delay, 0s);
}
.wsllc-contact.is-armed .wsllc-contact__title.is-inview .wsllc-contact__char,
.wsllc-contact.is-armed .wsllc-contact__title.is-inview .wsllc-contact__dot {
    opacity: 1;
    transform: translateY(0);
}

/* Form rows slide up one after another once the form scrolls into view */
.wsllc-contact.is-armed .wsllc-contact__form .wpcf7 form > p {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--wc-row-delay, 0s); /* after the shorthand, which resets delays */
}
.wsllc-contact.is-armed .wsllc-contact__form.is-inview .wpcf7 form > p {
    opacity: 1;
    transform: none;
}
.wsllc-contact .wpcf7 form > p:nth-of-type(1) { --wc-row-delay: 0.05s; }
.wsllc-contact .wpcf7 form > p:nth-of-type(2) { --wc-row-delay: 0.13s; }
.wsllc-contact .wpcf7 form > p:nth-of-type(3) { --wc-row-delay: 0.21s; }
.wsllc-contact .wpcf7 form > p:nth-of-type(4) { --wc-row-delay: 0.29s; }
.wsllc-contact .wpcf7 form > p:nth-of-type(5) { --wc-row-delay: 0.37s; }
.wsllc-contact .wpcf7 form > p:nth-of-type(6) { --wc-row-delay: 0.45s; }
.wsllc-contact .wpcf7 form > p:nth-of-type(7) { --wc-row-delay: 0.53s; }
@media (prefers-reduced-motion: reduce) {
    .wsllc-contact.is-armed .wsllc-reveal,
    .wsllc-contact.is-armed .wsllc-contact__char,
    .wsllc-contact.is-armed .wsllc-contact__dot,
    .wsllc-contact.is-armed .wsllc-contact__form .wpcf7 form > p {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .wsllc-contact__rail {
        display: none;
    }
    .wsllc-contact__info-inner {
        grid-template-columns: repeat(2, 1fr);
    }
    /* narrow screens: submit back in flow under the fields (relative, not
       static, so the spinner keeps anchoring to the p) */
    .wsllc-contact .wpcf7 form > p:last-of-type {
        position: relative;
        margin: 8px 0 0;
    }
}
@media (max-width: 560px) {
    .wsllc-contact__logo {
        width: 140px;
    }
    .wsllc-contact__inner {
        padding: 0 22px;
    }
    .wsllc-contact__info-inner {
        grid-template-columns: 1fr;
        gap: 34px;
        padding-left: 22px;
        padding-right: 22px;
    }
}
