/* =========================================================
   brief.css — owned by the brief module (Signature 3)
   LET'S GO live button layer, flood, brief sheet states.
   Loads after site.css; overrides are marked.
   ========================================================= */

/* §09 must stay free of stacking contexts so the z45 label / confetti
   sit above the fixed yolk canvas (z40). Override: site.css gives the
   grid z-index:1, which traps them under the canvas. The flood (z0)
   still paints first because it comes earlier in the DOM. */
.contact > .grid { z-index: auto; }

/* ---------- LET'S GO live layer ----------
   Refit to the drawn top face of mascot-lets-go (820×812): centre
   (67%, 77.5%), rx 18.75% of width, ry 9.3% of height (aspect ≈ .5).
   The anchor is refitted too so the live yolk docks on the same face. */
.letsgo__face,
.yk-anchor--face { left: 48.25%; top: 68.2%; width: 37.5%; height: 18.6%; }
.letsgo__face { transform-origin: 50% 100%; }
.letsgo__label { left: 52%; top: 72.9%; width: 30%; }
.letsgo__hit { left: 46%; top: 64%; width: 42%; height: 33%; -webkit-tap-highlight-color: transparent; }
.letsgo__hit:focus { outline: none; }

/* Live yolk away from stop 6: show a paper face so the drawn letters
   never double up under the live label. From flood:start the face is
   back in yolk under the fading live yolk: it is part of the flood
   (the one allowed yolk surface). */
html.yk-live .letsgo:has(.yk-anchor--face:not(.is-docked)) .letsgo__face,
html.yk-live .contact.is-flooded .letsgo__face { visibility: visible; }
html.yk-live .contact:not(.is-flooded) .letsgo:has(.yk-anchor--face:not(.is-docked)) .letsgo__face ellipse { fill: var(--paper); }

/* confetti: 18 ink glyphs, spawned at the face centre, removed after */
.letsgo__confetti { position: absolute; left: 67%; top: 77.5%; width: 0; height: 0; z-index: 45; pointer-events: none; }
.letsgo__confetti svg { position: absolute; max-width: none; overflow: visible; color: var(--ink); }

/* ---------- on the flood ---------- */
/* once the sheet is open the doodle sits beside it (bottom-aligned) instead of centring on the whole column */
@media (min-width: 1024px) { .contact.is-briefing .letsgo { align-self: end; } }
.contact[data-tone="yolk"] .link-u:is(:hover, :focus-visible) { background-image: linear-gradient(currentColor, currentColor); }

/* ---------- brief sheet ---------- */
.brief.is-morphing { overflow: clip; }
.brief__done:focus { outline: none; }
.brief__stepset .chips-in { row-gap: 12px; }
/* ₹ must never be set in JetBrains Mono (it has none): the chip falls through to Archivo for that glyph only.
   Needs the §2.2 Archivo ₹ subset (unicode-range U+20B9) in the head — see "Requests for main". */
.brief .chip { font-family: "JetBrains Mono", "Archivo", var(--f-mono); }
.brief__stickers { min-height: 28px; align-items: center; padding-block: 4px; }
.brief__stickers .stk > span { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }
/* opened from a "20-min call" CTA: one line under the first question (brief.js callNote) */
.brief__callnote { margin-top: -6px; max-width: 60ch; color: var(--ink-2); }
/* Back / Skip are text links (≈29px tall): grow the hit area to 44px+ without moving the .link-u underline */
.brief__back, .brief__skip { position: relative; }
.brief__back::after, .brief__skip::after { content: ""; position: absolute; inset: -8px -6px; }
/* while sending: aria-disabled (not disabled) so focus stays on the button */
.brief__send[aria-disabled="true"] { opacity: .55; cursor: progress; }

/* site.css hides empty errors with display:none, which drops their aria-live region from the
   accessibility tree, so an error that appears on blur is never announced. Keep empty ones
   rendered but zero-size (absolute: no grid gap, no layout change). */
.brief .err:empty { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* endpoint failure */
.brief__senderr { display: grid; justify-items: start; gap: 12px; margin-top: 24px; }
.brief__senderr .err { max-width: 46ch; }

/* success panel: the head keeps the YOUR BRIEF strip as the receipt */
.brief.is-done :is(.brief__step, .brief__ticks, .brief__stepset, .brief__nav, .brief__privacy, .brief__senderr) { display: none; }
.brief.is-done .brief__head { margin-bottom: 20px; }
.brief__done { display: grid; gap: 16px; }
.brief__ok { display: none; gap: 12px; }
.brief[data-done-kind="sent"] [data-done-kind="sent"],
.brief[data-done-kind="mail"] [data-done-kind="mail"] { display: grid; }
.brief__ok p { max-width: 44ch; }
.brief__cal { color: var(--ink-2); }
.brief__alt { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; }
.brief__alt .small { color: var(--ink-2); }
.brief__alt .link-u { color: var(--ink); }

/* the van drives in from the sheet edge: the strip bleeds to the sheet border and clips */
.brief__van { overflow: hidden; margin-inline: calc(-1 * clamp(20px, 3vw, 40px)); padding-inline: clamp(20px, 3vw, 40px); }
.brief__van picture { display: block; width: min(240px, 62%); }
.brief__van img { display: block; width: 100%; height: auto; }
.brief[data-done-kind="mail"] .brief__van { display: none; }
/* one mascot per viewport (non-negotiable #3): when the van drives in, the LET'S GO figure steps out.
   visibility keeps its box, so nothing reflows and the yolk anchor inside still measures. */
.contact.is-sent .letsgo { opacity: 0; visibility: hidden; }
html[data-motion="on"] .contact.is-sent .letsgo { transition: opacity .3s var(--e-p3out), visibility 0s linear .3s; }

@media (max-width: 767px) {
  .brief__nav { gap: 12px 16px; }
  .brief__next, .brief__send { min-height: 52px; padding-inline: 24px; }
}

/* no-JS: all four fieldsets stack and post via mailto, so the step counter, brief strip, Start button
   and the drawn button's hit area (a pointer cursor that does nothing) mean nothing */
.no-js .brief__head,
.no-js .letsgo__hit,
.no-js [data-start-brief] { display: none; }   /* the button only works with JS; the form is right below */

/* main.js's openBrief() fallback (brief.js failed to load) opens the form without us: lay it out
   like the no-JS form (all questions, native mailto submit) instead of an empty sheet */
.js .brief.is-open:not(.is-enhanced) .brief__stepset { display: grid; }
.js .brief.is-open:not(.is-enhanced) .brief__stepset + .brief__stepset { margin-top: 28px; }
.js .brief.is-open:not(.is-enhanced) .brief__send { display: inline-flex; }
.js .brief.is-open:not(.is-enhanced) :is(.brief__head, .brief__next) { display: none; }
