/* =========================================================
   "What's it like working with me?" pinboard and the letter.
   Home page only. Loaded after ben-home.css.
   ========================================================= */

/* ---------- Pinboard ---------- */
#testimonials.wm-section {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 44px 48px 48px;
    overflow: hidden;
}

.wm-head {
    text-align: center;
    margin-bottom: 40px;
}

.wm-head .bw-note {
    max-width: 620px;
    margin: 12px auto 0;
}

.wm-board {
    position: relative;
    height: 860px;
    max-width: 1072px;
    margin: 0 auto;
}

.wm-me {
    position: absolute;
    left: 50%;
    top: 250px;
    width: 300px;
    margin: 0;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
}

.wm-me img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.12));
}

.wm-piece {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    margin: 0;
    transform: rotate(var(--r));
    transition: transform 0.35s var(--ease-polish, ease), box-shadow 0.35s ease;
    z-index: 2;
}

.wm-piece:hover,
.wm-piece:focus-within {
    transform: rotate(0deg) translateY(-4px) scale(1.02);
    z-index: 5;
}

/* message cards: a white card inside a thick coloured frame */
.wm-msg {
    padding: 18px 20px 16px;
    background: #FFFFFF;
    border: 5px solid var(--frame);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(30, 28, 27, 0.10);
    font-family: var(--font-ui);
}

.wm-msg:hover {
    box-shadow: 0 16px 32px rgba(30, 28, 27, 0.16);
}

.wm-who {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    text-align: left; /* name and role line up on the left, next to the photo or logo (asked 6 Oct 2026) */
}

.wm-who img,
.wm-logo {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(26, 26, 24, 0.12);
}

.wm-logo {
    display: grid;
    place-items: center;
    background: #1A1A18;
    color: #FFFFFF;
    font-family: var(--font-sketch);
    font-weight: 700;
    font-size: 20px;
}

.wm-logo-wop {
    background: #FFFFFF;
    color: #1A1A18;
}

.wm-who strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1A1A18;
}

.wm-who span span {
    display: block;
    font-size: 12.5px;
    color: #6B6B66;
}

.wm-msg blockquote {
    margin: 0;
}

.wm-msg blockquote p {
    margin: 0 0 8px;
    font-size: 14.5px;
    line-height: 1.55;
    color: #2E2D2A;
}

.wm-msg mark {
    background: rgba(50, 127, 134, 0.16);
    color: inherit;
    padding: 1px 2px;
    border-radius: 3px;
}

.wm-src {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    color: #6B6B66;
}

.wm-src a,
.wm-link {
    color: var(--color-highlight-dark, #1B4A4F);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wm-link::after {
    content: " ↗";
}

/* sticky notes */
.wm-sticky {
    padding: 22px 20px 18px;
    background: var(--paper);
    box-shadow: 0 14px 22px rgba(30, 28, 27, 0.14);
    border-radius: 2px 2px 14px 2px;
}

.wm-sticky p {
    margin: 0 0 12px;
    font-family: 'Kalam', var(--font-ui);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.3;
    color: #22211F;
}

.wm-sticky footer {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    color: rgba(34, 33, 31, 0.7);
}

/* photo print with a strip of tape */
.wm-photo {
    padding: 10px 10px 12px;
    background: #FFFFFF;
    box-shadow: 0 12px 22px rgba(30, 28, 27, 0.14);
}

.wm-photo::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    width: 84px;
    height: 24px;
    transform: translateX(-50%) rotate(-3deg);
    background: rgba(246, 206, 120, 0.75);
}

.wm-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.wm-photo figcaption {
    margin-top: 8px;
    text-align: center;
    font-family: 'Kalam', var(--font-ui);
    font-size: 17px;
    font-weight: 700;
    color: #22211F;
}

/* entrance: pieces drop in once (only when working-with-me.js runs) */
.wm-js .wm-piece {
    opacity: 0;
    transform: rotate(var(--r)) translateY(-24px) scale(0.96);
}

.wm-js .wm-board.is-in .wm-piece {
    opacity: 1;
    transform: rotate(var(--r));
    transition: opacity 0.5s ease var(--d, 0s), transform 0.6s var(--ease-sketch, ease) var(--d, 0s);
}

.wm-js .wm-board.is-in .wm-piece:hover,
.wm-js .wm-board.is-in .wm-piece:focus-within {
    transform: rotate(0deg) translateY(-4px) scale(1.02);
    transition-delay: 0s;
}

/* ---------- Letter ---------- */
/* Everything is centred: heading, then the letter in the middle with
   doodles on both sides, then the buttons. */
#contact.lt-section {
    text-align: center;
    padding: 44px 48px 48px;
    overflow: hidden;
}

.lt-head {
    margin: 0 auto;
}

/* Black heading on one line (wraps only on small screens) */
#contact .lt-head h2.bw-title {
    display: block;
    color: #1A1A18;
    line-height: 1.2 !important;
    text-wrap: balance;
}

.lt-head .bw-note {
    margin: 12px auto 0;
}

.lt-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 600px) minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
    margin-top: 40px;
    text-align: left;
}

.lt-letter {
    position: relative;
    padding: 34px 40px 30px;
    background: #FFFFFF;
    border: 8px solid #F6BE3B;
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(30, 28, 27, 0.10);
    transform: rotate(-1.2deg);
    transition: transform 0.4s var(--ease-polish, ease);
    font-family: 'Kalam', var(--font-ui);
    font-size: 20px;
    line-height: 1.5;
    color: #22211F;
}

.lt-letter:hover {
    transform: rotate(0deg);
}

.lt-letter p {
    margin: 0 0 12px;
    max-width: 400px;
}

.lt-letter .lt-sign {
    margin: 18px 0 0;
    font-weight: 700;
    font-size: 24px;
}

/* Postage stamp with the mascot */
.lt-stamp {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 104px;
    padding: 8px;
    background: #FFF7E3;
    transform: rotate(6deg);
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.12));
    /* holes only in the padding ring, the picture stays whole */
    -webkit-mask: radial-gradient(circle 4px at 4px 4px, transparent 97%, #000) -4px -4px / 11px 11px, linear-gradient(#000 0 0) content-box;
    mask: radial-gradient(circle 4px at 4px 4px, transparent 97%, #000) -4px -4px / 11px 11px, linear-gradient(#000 0 0) content-box;
}

.lt-stamp img {
    display: block;
    width: 100%;
    height: 96px;
    object-fit: cover;
    object-position: 50% 30%;
    background: #CFE7E6;
}

.lt-stamp-code {
    display: block;
    margin-top: 4px;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #55554F;
}

.lt-ps {
    position: absolute;
    right: 34px;
    bottom: 26px;
    font-family: 'Kalam', var(--font-ui);
    font-weight: 700;
    font-size: 26px;
    line-height: 1;
    color: #E8637A;
    transform: rotate(-6deg);
}

.lt-ps span {
    color: #266268;
}

/* Doodles: "hi" top left, pointer and "yay!" on the right */
.lt-side {
    position: relative;
    font-family: 'Kalam', var(--font-ui);
    font-weight: 700;
}

.lt-hi {
    position: absolute;
    top: 0;
    right: 10%;
    font-size: 84px;
    line-height: 1;
    transform: rotate(-8deg);
}

.lt-hi span:first-child,
.lt-yay span:nth-child(1),
.lt-yay span:nth-child(4) {
    color: #F2A93B;
}

.lt-hi span:last-child,
.lt-yay span:nth-child(2) {
    color: #E8637A;
}

.lt-yay span:nth-child(3) {
    color: #266268;
}

.lt-pointer {
    position: absolute;
    top: 38%;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-weight: 400;
    font-size: 26px;
    line-height: 1.1;
    color: #22211F;
    white-space: nowrap;
    transform: rotate(-3deg);
}

.lt-pointer svg {
    order: 2;
    color: #22211F;
}

.lt-yay {
    position: absolute;
    bottom: 0;
    left: 10%;
    font-size: 88px;
    line-height: 1;
    transform: rotate(-6deg);
}

/* Let's connect: 3 buttons by importance */
.lt-connect {
    margin: 52px 0 0;
    font-family: var(--font-sketch);
    font-size: 2rem;
    font-weight: 700;
    color: #1A1A18;
    text-align: center;
}

.lt-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.lt-actions .lt-btn {
    margin-top: 0;
    border-radius: 10px;
}

/* 1. Filled: the main action */
#contact .lt-actions .lt-btn-primary,
#contact .lt-actions .lt-btn-primary.is-copied {
    background: #266268;
    border-color: #266268;
    color: #FFFFFF;
}

#contact .lt-actions .lt-btn-primary:hover {
    background: #1B4A4F;
    border-color: #1B4A4F;
}

/* 2. Outline: the second choice */
#contact .lt-actions .lt-btn-secondary {
    background: transparent;
    border-color: #266268;
    color: #1B4A4F;
}

#contact .lt-actions .lt-btn-secondary:hover {
    background: rgba(38, 98, 104, 0.08);
}

/* 3. Text only: the quiet extra */
#contact .lt-actions .lt-btn-tertiary {
    background: transparent;
    border-color: transparent;
    color: #1B4A4F;
    text-decoration: underline;
    text-decoration-color: rgba(27, 74, 79, 0.35);
    text-underline-offset: 5px;
}

#contact .lt-actions .lt-btn-tertiary:hover {
    background: transparent;
    text-decoration-color: currentColor;
}

#contact .lt-actions .lt-btn-tertiary:hover svg {
    transform: translate(2px, -2px);
}

/* ---------- Tablet and phone ---------- */
@media (max-width: 1000px) {
    #testimonials.wm-section {
        margin: 0 16px 20px;
        padding: 36px 28px 36px !important; /* beats an old !important rule in styles.css */
    }

    .wm-board {
        height: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 28px 24px;
        align-items: start;
    }

    .wm-me {
        position: static;
        grid-column: 1 / -1;
        justify-self: center;
        width: 200px;
        transform: none;
    }

    .wm-piece {
        position: relative;
        left: auto;
        top: auto;
        width: auto;
        transform: rotate(calc(var(--r) * 0.5));
    }

    .wm-js .wm-board.is-in .wm-piece {
        transform: rotate(calc(var(--r) * 0.5));
    }

    .wm-photo {
        max-width: 240px;
        justify-self: center;
    }

    #contact.lt-section {
        margin: 0 16px 20px;
        padding: 36px 28px 36px;
    }

    /* Letter full width, doodles in a row above it */
    .lt-stage {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "l r" "letter letter";
        gap: 8px 16px;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .lt-side-l { grid-area: l; height: 96px; }
    .lt-side-r { grid-area: r; height: 96px; }
    .lt-letter { grid-area: letter; }

    .lt-hi {
        right: auto;
        left: 0;
        font-size: 60px;
    }

    .lt-pointer {
        top: auto;
        bottom: 8px;
        left: auto;
        right: 0;
        align-items: flex-end;
        font-size: 22px;
    }

    .lt-pointer svg {
        margin: 14px 28px 0 0;
        transform: rotate(-60deg);
    }

    .lt-yay {
        display: none;
    }
}

@media (max-width: 640px) {
    #testimonials.wm-section {
        margin: 0 12px 16px;
        padding: 28px 16px 28px !important;
    }

    .wm-board {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .wm-me {
        width: 170px;
    }

    .wm-msg blockquote p {
        font-size: 14px;
    }

    #contact.lt-section {
        margin: 0 12px 40px; /* 40px before the footer when it is the last card (Work page) */
        padding: 28px 16px 24px;
    }

    /* Phones: no "hi" or "a letter for you" doodles, just the letter, 24px under the heading (asked 5 Oct 2026) */
    .lt-side {
        display: none;
    }

    .lt-stage {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "letter";
        gap: 0;
        margin-top: 24px;
    }

    .lt-letter {
        padding: 24px 20px 64px;
        border-width: 6px;
        font-size: 17.5px;
        transform: rotate(-0.8deg);
    }

    .lt-stamp {
        position: relative;
        top: auto;
        right: auto;
        float: right;
        width: 80px;
        margin: -8px -6px 8px 10px;
    }

    .lt-stamp img {
        height: 68px;
    }

    .lt-ps {
        right: 20px;
        bottom: 18px;
        font-size: 21px;
    }

    .lt-connect {
        margin-top: 32px;
        font-size: 1.7rem;
    }

    .lt-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .lt-actions .lt-btn {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {

    .wm-piece,
    .lt-letter,
    .wm-js .wm-board.is-in .wm-piece {
        transition: none;
    }

    .wm-js .wm-piece {
        opacity: 1;
    }
}

/* Softworker logo in the "Working with me" card (asked 2026-10-01) */
.wm-who img.wm-logo-img {
    background: #FFFFFF;
    padding: 6px;
    box-sizing: border-box;
    object-fit: contain;
}
