/* Let's talk: "Bring one task." The cards on the cork board are the
   choices; picking one flies it onto the clipboard and starts the brief
   underneath. Built from the tokens in styles.css. */

html.motion-pending .lt h1 { visibility: hidden; }

.lt { position: relative; overflow: hidden; padding-block: clamp(28px, 4.5vw, 64px) clamp(44px, 6vw, 88px); }
.lt-sand { background: var(--paper-2); --soft: var(--ink-soft); }
.lt-head h1 { font-size: clamp(2.8rem, 7.2vw, 6rem); line-height: 0.96; letter-spacing: -0.03em; }
.lt-head .wd { padding-bottom: 0.12em; margin-bottom: -0.12em; }
.f-deep { fill: var(--paper-2) !important; }
.lt-go .arr { display: inline-block; transition: transform 0.2s ease; }
@media (hover: hover) and (pointer: fine) { .lt-go:hover .arr { transform: translateY(3px); } }

@keyframes lt-steam { 0% { opacity: 0; transform: translateY(6px); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.lt-steam path { stroke-width: 2 !important; opacity: 0; animation: lt-steam 3.2s ease-in-out infinite; transform-box: fill-box; }
.lt-steam path:nth-child(2) { animation-delay: -1.1s; }
.lt-steam path:nth-child(3) { animation-delay: -2.1s; }

/* The brief form under the room. */
.lt-form { scroll-margin-top: 12px; }
.lt-form-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 25em); gap: 12px 56px; align-items: end; margin-bottom: clamp(24px, 4vw, 44px); }
.lt-form-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.lt-form-head .lead { color: var(--ink-soft); }
@media (max-width: 820px) { .lt-form-head { grid-template-columns: 1fr; } }

/* ---------- Heading ---------- */

.bt .lt-head { display: block; margin-bottom: clamp(22px, 3vw, 36px); }
.bt .lt-head .lead { margin-top: clamp(12px, 1.6vw, 18px); max-width: 44em; color: var(--ink); }
.bt-cue { margin-top: 10px; font-weight: 700; color: var(--ink-soft); }
.bt-cue-arr { display: inline-block; margin-left: 4px; color: var(--brick); }
.bt h1 { position: relative; }
.bt-one { position: relative; display: inline-block; margin: 0 0.1em; }
.bt-ring { position: absolute; left: -14%; top: 6%; width: 128%; max-width: none; height: 104%; overflow: visible; pointer-events: none; }
.bt-ring path { fill: none; stroke: var(--brick); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- The room ---------- */

.bt-room {
  --card-w: var(--cell-w, 150px);
  --card-h: 112px;
  position: relative; container-type: inline-size;
  display: flex; flex-direction: column; gap: 26px;
  padding: 26px 14px 24px;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(90deg, transparent 0 22px, rgba(226, 208, 170, 0.45) 22px 24px);
  border: var(--line) solid var(--ink); border-radius: var(--r-lg); box-shadow: 0 10px 0 var(--ink);
  overflow: hidden;
}
.bt-back, .bt-front { display: none; }

/* Cork board */
.bt-board { position: relative; padding: 8px; background: #b77c45; border: var(--line) solid var(--ink); border-radius: 6px; box-shadow: inset 0 0 0 3px rgba(255, 238, 205, 0.18); }
.bt-cork {
  list-style: none; margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px;
  padding: 34px 12px 16px;
  background-color: #d9b27a;
  background-image:
    radial-gradient(circle at 30% 40%, rgba(146, 98, 48, 0.35) 0 1px, transparent 1.6px),
    radial-gradient(circle at 70% 75%, rgba(255, 240, 210, 0.45) 0 1px, transparent 1.6px),
    radial-gradient(circle at 55% 20%, rgba(120, 78, 36, 0.3) 0 0.8px, transparent 1.4px);
  background-size: 9px 9px, 13px 13px, 7px 7px;
  border: 2px solid var(--ink); border-radius: 3px;
}
@media (min-width: 600px) { .bt-cork { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bt-label { position: absolute; z-index: 6; left: 50%; top: 2px; transform: translateX(-50%) rotate(-1.5deg); white-space: nowrap; padding: 4px 14px; background: var(--white); border: 2px solid var(--ink); border-radius: 3px; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1rem; }
.bt-label::before, .bt-label::after { content: ""; position: absolute; top: -8px; width: 26px; height: 12px; background: rgba(248, 226, 166, 0.9); border: 1.5px solid rgba(34, 50, 44, 0.5); }
.bt-label::before { left: -10px; transform: rotate(-24deg); }
.bt-label::after { right: -10px; transform: rotate(22deg); }

.bt-cell { position: relative; display: grid; place-items: center; min-height: var(--card-h); }
.bt-pin { position: absolute; z-index: 5; left: 50%; top: -7px; width: 15px; height: 15px; margin-left: -7.5px; border-radius: 50%; border: 2px solid var(--ink); background: radial-gradient(circle at 35% 32%, #f3a58d 0 18%, var(--brick) 30% 100%); pointer-events: none; }
/* A pin in someone's hand rides above a flying card. The board sets no
   z-index of its own, so its pins share the room's layers with that card. */
.bt-pin.is-up { z-index: 40; }
.bt-pin::after { content: ""; position: absolute; left: 3px; top: 11px; width: 7px; height: 5px; border-radius: 50%; background: rgba(60, 36, 14, 0.25); filter: blur(1px); z-index: -1; }

/* Index cards */
.bt-card {
  position: relative; z-index: 1;
  width: var(--card-w); height: var(--card-h);
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 12px 10px; margin: 0;
  text-align: left; color: var(--ink); font: inherit; cursor: pointer;
  background: var(--white); border: 2px solid var(--ink); border-radius: 3px;
  box-shadow: 0 3px 0 rgba(34, 50, 44, 0.3);
  transition: translate 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
/* The lift is for a real pointer only: on touch, a tap would leave the card stuck in the air. */
@media (hover: hover) and (pointer: fine) { .bt-card:hover { translate: 0 -4px; box-shadow: 0 8px 0 rgba(34, 50, 44, 0.22); } }
.bt-card:active { scale: 0.98; }
.bt-card:focus-visible { outline: 3px solid var(--brick); outline-offset: 4px; }
.bt-card.is-flying { z-index: 30; margin: 0; translate: none; pointer-events: none; }
.bt-card .ico { position: absolute; top: 9px; right: 9px; width: 26px; }
.bt-card-t { display: block; padding: 0 30px 2px 0; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.05rem; line-height: 1.1; }
.bt-card-s { --lh: 18px; position: relative; isolation: isolate; display: block; flex: 1 1 auto; min-height: 0; overflow: hidden; font-size: 0.8rem; line-height: var(--lh); color: var(--ink-soft); }
.bt-lines { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bt-lines i { display: block; height: var(--lh); box-sizing: border-box; border-bottom: 1px solid rgba(95, 145, 160, 0.4); }
.bt-card-own .bt-card-s { font-style: italic; }
.bt-card[aria-pressed="true"] { box-shadow: 0 4px 0 rgba(34, 50, 44, 0.3); }

/* Clipboard */
.bt-clip { position: relative; align-self: center; width: calc(var(--card-w) + 44px); padding: 26px 12px 12px; background: var(--mustard); border: var(--line) solid var(--ink); border-radius: 10px; }
.bt-clamp { position: absolute; z-index: 7; left: 50%; top: -12px; width: 70px; height: 24px; margin-left: -35px; background: var(--ink); border-radius: 6px; transform-origin: 50% 0; }
.bt-clamp::after { content: ""; position: absolute; left: 50%; top: 6px; width: 22px; height: 7px; margin-left: -11px; border-radius: 4px; background: #5b6b64; }
.bt-paper { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 9px 14px; background: var(--white); border: 2px solid var(--ink); border-radius: 2px; }
.bt-paper-h { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.15rem; }
.bt-slot { position: relative; display: grid; place-items: center; width: var(--card-w); height: var(--card-h); border-radius: 3px; }
.bt-slot .bt-card { position: absolute; inset: 0; width: auto; height: auto; }
.bt-hint { padding: 8px; text-align: center; font-size: 0.85rem; font-weight: 400; color: var(--ink-soft); opacity: 0.5; line-height: 1.3; }
.bt-slot.is-full .bt-hint { visibility: hidden; }
.bt-rules { width: 82%; height: 11px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); opacity: 0.22; }

/* Under the room */
.bt-after { margin-top: clamp(26px, 3.6vw, 40px); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.bt-status { flex: 0 1 auto; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-soft); }
.bt-status q { font-style: italic; quotes: "\201C" "\201D"; }

/* ---------- The whole room, from 980px ---------- */

@media (min-width: 980px) {
  .bt-room {
    --card-w: 15.6cqw; --card-h: 12.6cqw;
    display: block; padding: 0; aspect-ratio: 1000 / 540; background-image: none;
  }
  .bt-back, .bt-front { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  .bt-front { z-index: 4; }
  .bt-board { position: absolute; left: 5%; top: 8%; width: 53%; height: 61%; padding: 0.9cqw; }
  .bt-cork { height: 100%; box-sizing: border-box; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 0.6cqw; padding: 3cqw 0.8cqw 0.6cqw; background-size: 0.8cqw 0.8cqw, 1.15cqw 1.15cqw, 0.62cqw 0.62cqw; }
  .bt-label { top: 0.3cqw; padding: 0.35cqw 1.3cqw; font-size: 1.45cqw; }
  .bt-cell { min-height: 0; }
  .bt-pin { top: calc(50% - var(--card-h) / 2 - 0.55cqw); width: 1.45cqw; height: 1.45cqw; margin-left: -0.72cqw; }
  .bt-pin::after { left: 0.3cqw; top: 1.05cqw; width: 0.7cqw; height: 0.5cqw; }
  .bt-card { gap: 0.55cqw; padding: 1cqw 1.1cqw 0.9cqw; }
  .bt-card .ico { top: 0.8cqw; right: 0.8cqw; width: 2.2cqw; }
  .bt-card-t { padding: 0 2.6cqw 0.2cqw 0; font-size: 1.7cqw; }
  .bt-card-s { --lh: 1.62cqw; font-size: 1.22cqw; }
  .bt-clip { position: absolute; z-index: 3; left: 65.6%; top: 32%; width: 22.8%; height: 46%; padding: 2.2cqw 1.2cqw 1.2cqw; border-radius: 1cqw; }
  .bt-clamp { top: -1.2cqw; width: 7cqw; height: 2.5cqw; margin-left: -3.5cqw; border-radius: 0.6cqw; }
  .bt-clamp::after { top: 0.6cqw; width: 2.2cqw; height: 0.7cqw; margin-left: -1.1cqw; }
  .bt-paper { height: 100%; box-sizing: border-box; gap: 0.7cqw; padding: 1cqw 0.8cqw; }
  .bt-paper-h { font-size: 1.9cqw; }
  .bt-hint { font-size: 1.2cqw; }
  .bt-rules { height: 1.1cqw; }
}

/* ---------- Living details ---------- */

@keyframes bt-drift { from { transform: translateX(-120px); } to { transform: translateX(340px); } }
@keyframes bt-tick { to { transform: rotate(360deg); } }
@keyframes bt-halo { 0%, 100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 0.45; transform: scale(1.06); } }
.bt-cloud { animation: bt-drift 46s linear infinite; }
.bt-cloud-2 { animation-duration: 70s; animation-delay: -30s; }
.bt-halo { transform-box: fill-box; transform-origin: center; animation: bt-halo 6s ease-in-out infinite; }
.bt-min { transform-box: view-box; transform-origin: 610px 72px; animation: bt-tick 60s linear infinite; }
.bt-hour { transform-box: view-box; transform-origin: 610px 72px; animation: bt-tick 720s linear infinite; }
.bt-plant { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 9s ease-in-out infinite; }
.bt-cone { fill: var(--lit); stroke: none !important; opacity: 0.2; transition: opacity 0.5s ease; }
.bt-room.is-lit .bt-cone { opacity: 0.38; }
.bt-bulb { transition: fill 0.3s ease; }
.bt-room.is-lit .bt-bulb { fill: var(--lit) !important; }

/* Fills the shared drawing rules would otherwise clear. */
.bt-back .bt-stripe { fill: #e6d4ae !important; stroke: none !important; }
.bt-back .bt-stripes { fill: url(#bt-stripes) !important; stroke: none !important; }
.bt-back .bt-sky { fill: url(#bt-sky) !important; stroke: none !important; }
.bt-back .bt-sl1 rect { fill: #cfe2dc !important; stroke: none !important; }
.bt-back .bt-sl2 rect { fill: #a9c8c0 !important; stroke: none !important; }
.bt-back .bt-sl3 rect { fill: #e4efe9 !important; stroke: none !important; }

/* Phones: two narrow columns, so give the cards room and drop the icons. */
@media (max-width: 599px) {
  .bt-room { --card-h: 174px; }
  .bt-card { padding: 11px 10px 8px; }
  .bt-card .ico { display: none; }
  .bt-card-t { padding-right: 0; font-size: 1rem; }
  .bt-card-s { font-size: 0.78rem; }
}

/* Room under the headline's rising words for descenders (the g in "Bring"). */
.bt .lt-head h1 .wd { padding-bottom: 0.26em; margin-bottom: -0.26em; }
