
/* ============================================================
   The Book Development Service · The First Three Questions
   Added 12 September 2026. Homepage only (/js/three.js).
   A verso leaf under the hero: the visitor is asked three
   questions out loud and their answers sink into the deep
   under-layer, which is the one permitted source of under-text
   that is not the page's own words. Palette and type come from
   shell.css tokens, so a redesign restyles this in one place.
   Loudness: Begin is an invitation (the filled accent); everything
   else in the well is apparatus. No box-shadow anywhere.
   ============================================================ */

.pal-home .q3 { position: relative; padding: 1rem 0 5rem; }
.pal-home .q3 .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 15rem minmax(0, 46rem) minmax(0, 1fr);
    align-items: start;
    max-width: none;
    padding: 0;
}
/* verso: the leaf sits one track to the right of the hero's recto leaf, overlapping it in x as the
   leaves of an article do, with its gloss in the outer track on the left */
.pal-home .q3-leaf {
    grid-column: 3;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 3rem 3.2rem 3.2rem;
    border-right: 2px solid var(--reveal);
    border-left: none;
    background: var(--ink-raised);
}
/* the leaf overlaps the hero's leaf, as every leaf overlaps the one above */
.pal-home .q3-leaf { margin-top: -1.2rem; }
.pal-home .q3-gloss {
    grid-column: 2;
    align-self: end;
    padding: 0 3.8rem 3.2rem 0;
    max-width: 15rem;
    text-align: right;
    font-family: var(--serif);
    font-style: italic;
    font-size: calc(1.25rem * var(--read,1));
    line-height: 1.4;
    color: var(--reveal-lit);
    pointer-events: none;
}
.q3-label {
    font-family: var(--mono);
    font-size: var(--t-1);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--reveal-lit);
    margin: 0 0 1.4rem;
}
.q3-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: calc(clamp(1.7rem, 3.4vw, 2.5rem) * var(--read,1));
    line-height: 1.18;
    color: var(--vellum);
    margin: 0 0 1.2rem;
    text-align: left;
}
.q3-title em { font-style: italic; color: var(--oxide); }
.q3-intro {
    font-family: var(--serif);
    font-size: calc(1.08rem * var(--read, 1));
    line-height: 1.65;
    color: var(--vellum-body);
    margin: 0 0 2rem;
    max-width: 36rem;
}
.q3-start { display: flex; align-items: center; flex-wrap: wrap; gap: 1.1rem 1.4rem; }
.q3-begin {
    display: inline-flex; align-items: center; gap: 0.7rem;
    font-family: var(--mono);
    font-size: var(--t-2);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-deep);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 0;
    padding: 0.9rem 1.6rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
:root[data-daylight] .q3-begin { color: var(--ink-raised); }
.q3-begin:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.q3-begin svg { width: 1rem; height: 1rem; display: block; }
.q3-time { font-family: var(--mono); font-size: var(--t-2); letter-spacing: 0.06em; color: var(--vellum-dim); }

/* ── the stage ── */
.q3-stage { margin-top: 1.5rem; }
.q3-count {
    font-family: var(--mono);
    font-size: var(--t-1);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--oxide);
    margin: 0 0 1rem;
    display: flex; align-items: center; gap: 0.9rem;
}
.q3-count::after { content: ''; flex: 1; height: 1px; background: var(--reveal-deep); }
.q3-question {
    font-family: var(--serif);
    font-size: calc(clamp(1.35rem, 2.4vw, 1.75rem) * var(--read,1));
    line-height: 1.35;
    color: var(--vellum);
    margin: 0 0 1.6rem;
    min-height: 2.6em;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}
.q3-question.is-shown { opacity: 1; transform: none; }
.q3-question .q3-said { transition: color 0.25s ease; }
.q3-question .q3-said.is-lit { color: var(--oxide); }

.q3-answer-wrap { position: relative; }
.q3-answer {
    font-family: var(--serif);
    font-size: calc(1.3rem * var(--read, 1));
    line-height: 1.5;
    color: var(--vellum-body);
    min-height: 4.4em;
    padding: 0.4rem 0 0.8rem;
    border-bottom: 1px solid var(--reveal-deep);
    outline: none;
    caret-color: var(--oxide);
    transition: border-color 0.25s ease;
    word-break: break-word;
}
.q3-answer:focus { border-bottom-color: var(--oxide); }
.q3-answer:empty::before {
    content: attr(data-placeholder);
    color: var(--vellum-dim);
    font-style: italic;
    pointer-events: none;
}
.q3-answer .q3-final { animation: q3WordIn 0.5s ease both; }
.q3-answer .q3-interim { color: var(--vellum-dim); font-style: italic; }
@keyframes q3WordIn { from { opacity: 0; } to { opacity: 1; } }
.q3-answer.is-locked { pointer-events: none; }
.q3-answer.is-locked:empty::before { content: none; }

.q3-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 0.9rem 1rem; margin-top: 1.3rem; }
.q3-mic, .q3-next, .q3-skip, .q3-again {
    font-family: var(--mono);
    font-size: var(--t-2);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}
.q3-mic {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.7rem 1.1rem;
    background: transparent;
    color: var(--vellum);
    border: 1px solid var(--reveal);
}
.q3-mic svg { width: 0.95rem; height: 0.95rem; display: block; }
.q3-mic:hover { border-color: var(--reveal-lit); }
.q3-mic[aria-pressed="true"] { background: var(--oxide); border-color: var(--oxide); color: var(--ink-deep); }
:root[data-daylight] .q3-mic[aria-pressed="true"] { color: var(--ink-raised); }
.q3-mic .q3-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; display: none; }
.q3-mic[aria-pressed="true"] .q3-dot { display: block; animation: q3Breathe 1.3s ease-in-out infinite; }
.q3-mic[aria-pressed="true"] svg { display: none; }
@keyframes q3Breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.q3-mic[hidden] { display: none; }
.q3-next {
    padding: 0.7rem 1.3rem;
    background: var(--accent);
    color: var(--ink-deep);
    border: 1px solid var(--accent);
}
:root[data-daylight] .q3-next { color: var(--ink-raised); }
.q3-next:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.q3-next:disabled { opacity: 0.35; cursor: default; }
.q3-skip, .q3-again {
    background: none; border: none; padding: 0.7rem 0.2rem;
    color: var(--vellum-dim); letter-spacing: 0.06em; text-transform: none;
}
.q3-skip:hover, .q3-again:hover { color: var(--vellum); }
.q3-note {
    font-family: var(--mono);
    font-size: var(--t-2);
    letter-spacing: 0.04em;
    line-height: 1.6;
    color: var(--vellum-dim);
    margin: 1rem 0 0;
    min-height: 1.6em;
}
.q3-note.is-warm { color: var(--oxide); }

/* ── the close ── */
.q3-close { margin-top: 1.6rem; }
.q3-closing {
    font-family: var(--serif);
    font-size: calc(clamp(1.25rem, 2.2vw, 1.55rem) * var(--read,1));
    line-height: 1.4;
    color: var(--vellum);
    margin: 0 0 1.2rem;
}
.q3-under-note { font-family: var(--serif); font-size: calc(1.05rem * var(--read,1)); line-height: 1.6; color: var(--vellum-body); margin: 0 0 1.6rem; max-width: 34rem; }
/* ── the sheet: the three answers, set out and kept ──
   Added 13 September 2026, when the well moved to its own page. Until then the visitor's answers
   only sank into the under-layer and they were left holding nothing, which is what made a few
   minutes of an executive's time read as a trick rather than a gift. */
.q3-sheet {
    margin: 0 0 1.7rem;
    padding: 1.4rem 1.6rem 1.6rem;
    background: var(--ink-deep);
    border-left: 2px solid var(--oxide);
}
.q3-sheet-top {
    display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem 1.2rem;
    margin: 0 0 1.1rem;
}
.q3-sheet-label {
    font-family: var(--mono); font-size: var(--t-1); letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--oxide); margin: 0;
}
.q3-sheet-date { font-family: var(--mono); font-size: var(--t-1); letter-spacing: 0.1em; color: var(--vellum-dim); margin: 0; }
.q3-kept { margin: 0; padding: 0; list-style: none; }
.q3-kept .q3-kept-item {
    position: relative;
    padding: 1rem 0 1.1rem 2rem;
    border-top: 1px solid var(--reveal-deep);
}
.q3-kept .q3-kept-item:first-child { border-top: none; padding-top: 0; }
.q3-kept .q3-kept-item::before {
    content: attr(data-n);
    position: absolute; left: 0; top: 1.15rem;
    font-family: var(--mono); font-style: normal;
    font-size: var(--t-1); letter-spacing: 0.12em;
    color: var(--oxide);
}
.q3-kept .q3-kept-item:first-child::before { top: 0.15rem; }
.q3-kept-q {
    font-family: var(--mono);
    font-size: var(--t-2);
    line-height: 1.55;
    letter-spacing: 0.04em;
    color: var(--reveal-lit);
    margin: 0 0 0.5rem;
}
.q3-kept-a {
    font-family: var(--serif);
    font-size: calc(1.12rem * var(--read, 1));
    font-style: italic;
    line-height: 1.55;
    color: var(--vellum);
    margin: 0 0 0.55rem;
}
.q3-kept-item.is-empty .q3-kept-a { font-style: normal; color: var(--vellum-dim); font-size: calc(0.98rem * var(--read, 1)); }
.q3-kept-change {
    font-family: var(--mono); font-size: var(--t-1); letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--vellum-dim); background: none; border: none; border-bottom: 1px solid var(--reveal-deep);
    padding: 0 0 0.15rem; cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.q3-kept-change:hover, .q3-kept-change:focus-visible { color: var(--oxide); border-color: var(--oxide); }
.q3-kept-field {
    font-family: var(--serif);
    font-size: calc(1.12rem * var(--read, 1));
    line-height: 1.55;
    color: var(--vellum);
    background: var(--ink-raised);
    border: 1px solid var(--reveal);
    padding: 0.7rem 0.85rem;
    margin: 0 0 0.7rem;
    min-height: 3.4rem;
    outline: none;
}
.q3-kept-field:focus { border-color: var(--oxide); }
.q3-kept-field:empty::before { content: attr(data-placeholder); color: var(--vellum-dim); }
.q3-kept-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1.1rem; }
.q3-kept-save, .q3-kept-cancel {
    font-family: var(--mono); font-size: var(--t-1); letter-spacing: 0.12em; text-transform: uppercase;
    cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.q3-kept-save { color: var(--ink-deep); background: var(--reveal-lit); border: 1px solid var(--reveal-lit); padding: 0.45rem 1rem; }
.q3-kept-save:hover, .q3-kept-save:focus-visible { background: var(--oxide); border-color: var(--oxide); }
.q3-kept-cancel { color: var(--vellum-dim); background: none; border: none; border-bottom: 1px solid var(--reveal-deep); padding: 0 0 0.15rem; }
.q3-kept-cancel:hover, .q3-kept-cancel:focus-visible { color: var(--vellum); border-color: var(--vellum-dim); }
.q3-bring {
    display: flex; align-items: flex-start; gap: 0.8rem;
    font-family: var(--serif);
    font-size: calc(1.08rem * var(--read,1));
    color: var(--vellum);
    margin: 0 0 1.6rem;
    cursor: pointer;
}
.q3-bring input { appearance: none; -webkit-appearance: none; width: 1.1rem; height: 1.1rem; margin: 0.2rem 0 0; flex: none; border: 1px solid var(--reveal); background: transparent; cursor: pointer; position: relative; }
.q3-bring input:checked { background: var(--oxide); border-color: var(--oxide); }
.q3-bring input:checked::after {
    content: ''; position: absolute; left: 0.32rem; top: 0.1rem; width: 0.3rem; height: 0.6rem;
    border: solid var(--ink-deep); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.q3-close-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.9rem 1.4rem; }
.q3-close .hero-cta { margin-top: 0; }

/* ── the answer sinking into the under-layer ── */
.q3-sink {
    position: fixed;
    z-index: 5;   /* in front of the leaf while it is still the answer; behind the page once it has left it */
    pointer-events: none;
    font-family: var(--serif);
    color: var(--vellum-body);
    line-height: 1.5;
    transform-origin: left top;
    will-change: transform, opacity, filter;
    transition: transform 2.3s cubic-bezier(0.3, 0, 0.2, 1), color 1.6s ease, opacity 2.3s ease, filter 2.3s ease, letter-spacing 2.3s ease;
}
.q3-sink.is-sinking {
    color: var(--under-deep-color);
    filter: blur(var(--under-deep-blur));
    letter-spacing: 0.02em;
}
.q3-sink.is-behind { z-index: 0; }
.q3-sink.is-gone { transition: opacity 0.7s ease; opacity: 0 !important; }
.under-deep.is-swapping { transition: opacity 0.9s ease; }

/* ── the enquiry: what travels with it ── */
.q3-travel {
    margin: 0 0 1.4rem;
    padding: 1rem 1.1rem 1.1rem;
    border-left: 2px solid var(--oxide);
    background: var(--ink);
}
.q3-travel-head {
    font-family: var(--mono); font-size: var(--t-1); letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--oxide); margin: 0 0 0.6rem;
}
.q3-travel ol { margin: 0; padding: 0 0 0 1.2rem; }
.q3-travel li { font-family: var(--serif); font-style: italic; font-size: calc(0.98rem * var(--read,1)); line-height: 1.5; color: var(--vellum-body); margin: 0 0 0.35rem; }
.q3-travel-off { font-family: var(--mono); font-size: var(--t-2); color: var(--vellum-dim); margin: 0; }

/* ── widths ── */
@media (max-width: 1180px) {
    .pal-home .q3 .container { grid-template-columns: minmax(0, 1fr) minmax(0, 46rem) minmax(0, 1fr); }
    .pal-home .q3-leaf { grid-column: 2; }
    .pal-home .q3-gloss { display: none; }
}
@media (max-width: 900px) {
    .pal-home .q3-leaf { padding: 2.4rem 2.2rem 2.6rem; }
}
@media (max-width: 640px) {
    .pal-home .q3 { padding: 0.4rem 0 3rem; }
    .pal-home .q3 .container { grid-template-columns: 1fr; }
    .pal-home .q3-leaf { grid-column: 1; margin: 0; padding: 2rem 1.4rem 2.2rem; border-right-width: 2px; }
    .q3-tools { gap: 0.7rem; }
    .q3-begin { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .q3-question { transition: none; }
    .q3-sink { display: none; }
    .q3-mic[aria-pressed="true"] .q3-dot { animation: none; }
}

/* ── the voice frame for the questions: the same weather as Listen's, under its own name ── */
#threePulse {
    position: fixed !important;
    left: 0; right: 0; bottom: 0; top: 0;
    z-index: 38 !important;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    --vp: 0;
    --vp-c: var(--reveal-lit);
}
#threePulse.is-on { opacity: 1; }
:root[data-daylight] #threePulse { --vp-c: var(--reveal-lit); }
@media (prefers-reduced-motion: reduce) { #threePulse { display: none; } }

/* ============================================================
   The standalone page: /before-we-talk
   Added 13 September 2026. The well was a panel under the
   homepage hero until then, where a stranger met it before
   anyone had told them what this is. It now has a page of its
   own, which is a link Tommy sends a named person after a warm
   introduction. One leaf on the page, and the leaf is the
   instrument. The .pal-home rules above are untouched: they
   still describe the well as it was on the homepage, and cost
   nothing where that section no longer exists.
   ============================================================ */
/* the bar is fixed, so the head clears it the way every article header does */
.q3-page-head { padding: calc(var(--space-xl) + 3rem) 0 1.5rem; }
.q3-page-head .back-link { display: inline-block; margin: 0 0 1.6rem; }
.q3-page-label {
    font-family: var(--mono);
    font-size: var(--t-1);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--reveal-lit);
    margin: 0 0 1rem;
}
.q3-page-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: max(clamp(1.8rem, 4vw, 2.7rem), calc(1.6675rem * var(--read,1)));
    line-height: 1.15;
    color: var(--vellum);
    margin: 0 0 1rem;
    max-width: 20ch;
}
.q3-page-title em { font-style: italic; color: var(--oxide); }
.q3-page-sub {
    font-family: var(--serif);
    font-size: calc(1.1rem * var(--read, 1));
    line-height: 1.65;
    color: var(--vellum-body);
    margin: 0;
    max-width: 36rem;
}
.q3-page .q3 { position: relative; padding: 0 0 1.2rem; }
.q3-page .q3-leaf {
    max-width: var(--max-prose);
    margin: 0;
    padding: 2.6rem 2.8rem 2.8rem;
    border-right: 2px solid var(--reveal);
    border-left: none;
    background: var(--ink-raised);
}
.q3-page-after { padding: 0 0 4.5rem; }
.q3-page-after p {
    font-family: var(--serif);
    font-size: calc(1rem * var(--read, 1));
    line-height: 1.7;
    color: var(--vellum-dim);
    margin: 0 0 0.9rem;
    max-width: 36rem;
}
.q3-page-after a { color: var(--reveal-lit); text-decoration: none; border-bottom: 1px solid var(--reveal-deep); }
.q3-page-after a:hover { color: var(--oxide); border-color: var(--oxide); }
@media (max-width: 900px) {
    .q3-page .q3-leaf { padding: 2.2rem 2rem 2.3rem; }
}
@media (max-width: 640px) {
    .q3-page-head { padding: calc(var(--space-lg) + 2.6rem) 0 1.1rem; }
    .q3-page .q3-leaf { padding: 1.9rem 1.3rem 2rem; max-width: none; }
    .q3-page-after { padding: 0 0 3rem; }
    .q3-sheet { padding: 1.1rem 1.1rem 1.2rem; }
    .q3-kept .q3-kept-item { padding-left: 1.7rem; }
}

/* ── the enquiry form, where the answers were given on the other page ── */
.q3-travel-bring {
    display: flex; align-items: flex-start; gap: 0.65rem;
    font-family: var(--serif);
    font-size: calc(0.98rem * var(--read, 1));
    line-height: 1.5;
    color: var(--vellum);
    margin: 0 0 0.8rem;
    cursor: pointer;
}
.q3-travel-bring input {
    appearance: none; -webkit-appearance: none;
    width: 1.05rem; height: 1.05rem; margin: 0.18rem 0 0; flex: none;
    border: 1px solid var(--reveal); background: transparent; cursor: pointer; position: relative;
}
.q3-travel-bring input:checked { background: var(--oxide); border-color: var(--oxide); }
.q3-travel-bring input:checked::after {
    content: ''; position: absolute; left: 0.3rem; top: 0.08rem; width: 0.29rem; height: 0.58rem;
    border: solid var(--ink-deep); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
