/* $1,000 project-credit promotion (founder, 2026-11-12). Three parts, all driven by
   offer.js: the popup that drops under the tmux bar, the PROMOTION button in the bar
   (.tb-theme, styled in index.html), and the #promotion block under the consultation.
   Flat like the rest of the UI (D46): 1px borders, no shadow, no gradient, no side
   stripe. The amount is the only coloured text: --promo, the same green in both themes.
   When the promotion is over, delete this file, offer.js, the button and the block. */

/* ---------- popup ---------- */
.offer-dim{position:fixed;inset:0;z-index:70;background:rgba(3,12,24,.46);
  opacity:0;transition:opacity .45s ease;pointer-events:none}
:root[data-theme="light"] .offer-dim{background:rgba(7,17,30,.22)}
.offer-dim.on{opacity:1;pointer-events:auto}

/* Width = the title's width: the title does not wrap, and every other line is told to
   take no width of its own (width:0; min-width:100%), so the body wraps to the title. */
.offer{position:fixed;z-index:71;left:50%;top:calc(var(--bar) + 14px);
  width:max-content;max-width:calc(100vw - 32px);
  transform:translate(-50%,calc(-100% - var(--bar) - 30px));
  background:var(--bg1);border:1px solid var(--dim);color:var(--fg);
  font-family:var(--mono);padding:22px 26px 24px;
  transition:transform .6s cubic-bezier(.2,.9,.25,1.06)}
.offer.on{transform:translate(-50%,0)}
.offer:focus{outline:none}
.offer-k,.offer-p,.offer-row{width:0;min-width:100%}

.offer-k{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--mute);
  margin:0 0 12px;padding-right:34px;font-variant-numeric:tabular-nums;white-space:nowrap}
.offer-k b{font-weight:400;color:var(--fg)}
.offer-h{font-family:var(--display);font-weight:400;font-size:clamp(28px,4.2vw,39px);
  line-height:1.05;letter-spacing:.02em;text-transform:uppercase;margin:0 0 12px;white-space:nowrap}
.offer-h b{font-weight:400;color:var(--promo)}
.offer-p{font-size:14px;line-height:1.6;color:var(--mute);margin:0 0 18px}

.offer-row{display:flex;align-items:center;gap:18px}
.offer-go,.promo-go{display:block;text-align:center;text-decoration:none;
  font-family:var(--mono);font-size:14px;font-weight:700;letter-spacing:.08em;padding:14px 18px;
  background:var(--btn);border:1px solid var(--btn);color:var(--btn-text);
  transition:transform .12s,box-shadow .2s,filter .14s}
.offer-go{flex:1}
.offer-go:hover,.offer-go:focus-visible,.promo-go:hover,.promo-go:focus-visible{
  filter:brightness(1.06);transform:translateY(-1px);outline:none;box-shadow:var(--btn-rings)}
.offer-go:active,.promo-go:active{transform:translateY(0);filter:brightness(.96)}
.offer-no{background:transparent;border:0;padding:6px 0;cursor:pointer;white-space:nowrap;
  font-family:var(--mono);font-size:12px;letter-spacing:.06em;color:var(--mute)}
.offer-no:hover,.offer-no:focus-visible{color:var(--fg);outline:none;text-decoration:underline}

.offer-x{position:absolute;top:10px;right:10px;width:30px;height:30px;display:flex;
  align-items:center;justify-content:center;background:transparent;border:1px solid transparent;
  color:var(--mute);font-family:var(--mono);font-size:16px;line-height:1;cursor:pointer}
.offer-x:hover,.offer-x:focus-visible{border-color:var(--dim);color:var(--fg);outline:none}

@media (max-width:560px){
  .offer{width:calc(100vw - 32px);padding:20px 18px 18px}
  .offer-h{white-space:normal}
  .offer-row{flex-direction:column;align-items:stretch;gap:8px}
}
@media (prefers-reduced-motion:reduce){
  .offer{transform:translate(-50%,0);opacity:0;transition:opacity .3s ease}
  .offer.on{opacity:1}
}

/* ---------- #promotion block (under the consultation, same panel idiom) ----------
   Text on the left (chip, title, terms, schedule, button); the live credit and the
   countdown large on the right. On a phone the two figures sit between the terms and
   the schedule. */
.promo{margin-top:22px;border:1px solid var(--dim);background:var(--bg2);
  scroll-margin-top:calc(var(--bar) + 30px)}
.promo[hidden]{display:none}
/* inside the free-call block (2026-11-21): one box, the call on top, the credit under a rule */
.consult .promo{margin:0;border:0;border-top:1px solid var(--dim);background:transparent}
.consult .promo-b{grid-template-areas:"text fig" "steps fig"}
.consult-b .call-go{display:inline-block;min-width:240px;margin-top:2px}
@media (max-width:720px){ .consult .promo-b{grid-template-areas:"text" "fig" "steps"} }
@media (max-width:560px){ .consult-b .call-go{display:block;min-width:0} }
.promo-b{padding:18px;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:48px;
  grid-template-areas:"text fig" "steps fig" "go fig";align-items:start}
.promo-text{grid-area:text}
.promo-text h3{font-size:16px;margin:0 0 6px;color:var(--fg)}
.promo-text p{font-size:14px;color:var(--mute);line-height:1.65;margin-bottom:16px;max-width:68ch}
.promo-text p b{color:var(--fg)}

.promo-fig{grid-area:fig;align-self:center;display:flex;flex-direction:column;gap:22px;
  text-align:right;padding:6px 6px 6px 0}
.promo-cell{display:flex;flex-direction:column;gap:6px}
.promo-l{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--mute)}
.promo-v{font-family:var(--display);line-height:.95;color:var(--fg);font-variant-numeric:tabular-nums;white-space:nowrap}
.promo-amt{font-size:clamp(56px,6.4vw,84px);color:var(--promo)}
.promo-t{font-size:clamp(40px,4.4vw,58px)}

/* the schedule: one cell per 78-hour window, past ones struck, the current one framed */
.promo-steps{grid-area:steps;list-style:none;margin:0 0 18px;padding:0;
  display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}
.promo-steps li{border:1px solid var(--dim);padding:8px 2px 7px;text-align:center;
  font-size:12px;line-height:1.2;color:var(--mute);font-variant-numeric:tabular-nums}
.promo-steps li small{display:block;font-size:10px;letter-spacing:.04em;margin-top:3px}
.promo-steps li.past{opacity:.45;text-decoration:line-through}
.promo-steps li.now{border-color:var(--promo);color:var(--fg)}
.promo-go{grid-area:go;justify-self:start;min-width:240px}

@media (max-width:1000px){
  .promo-steps{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (max-width:720px){
  .promo-b{grid-template-columns:1fr;grid-template-areas:"text" "fig" "steps" "go"}
  .promo-fig{flex-direction:row;justify-content:space-between;text-align:left;gap:16px;
    padding:0;margin:4px 0 18px}
  .promo-amt{font-size:44px}
  .promo-t{font-size:34px}
}
@media (max-width:560px){
  .promo-go{justify-self:stretch;min-width:0}
  .promo-l{font-size:11px}
  .promo-amt{font-size:38px}
  .promo-t{font-size:30px}
}

/* .tb-theme sets display:flex, which beats the hidden attribute: say it outright */
#promoBtn[hidden]{display:none}

/* ---------- narrow top bar ----------
   PROMOTION does not fit beside the full "theme" and "cursor trail" labels below
   1300px (measured at 1160px: "field notes" ran under it; on a phone the menu button
   left the screen). Below 1300px those two shrink to their glyph (◐, ▦): the box is cut
   to the glyph's width and the label is clipped, so the markup, the aria-labels and
   every translated label stay as they are. index.html's full-label breakpoint moved
   from 1739px to 1859px for the same reason. */
@media (max-width:1300px){
  #themeBtn,#trailBtn{width:34px;padding:0 0 0 12px;justify-content:flex-start;
    overflow:hidden;white-space:nowrap;word-spacing:40px}   /* pushes the label past the clip */
  /* once heat.js has drawn the icon in its own box, drop the label and centre the icon */
  #themeBtn.has-ico,#trailBtn.has-ico{padding:0;justify-content:center;gap:0}
  #themeBtn.has-ico .tb-lb,#themeBtn.has-ico .tb-key,#trailBtn.has-ico .tb-lb{display:none}
  #promoBtn{padding:0 10px}
}

/* ===== D51 (2026-11-21, ported from Brand Kit/11 Icons/homepage-preview.html) =====
   Free call and promotion labels: white on audience purple, like the FOR ___ chips. */
#consult .aud-tag{background:var(--tag-aud)!important;color:#fff!important;border-color:var(--tag-aud)!important}
/* the promotion in the tile layout */
#consult .promo-b.px-promo{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)!important;
  grid-template-areas:none!important;column-gap:44px;padding:30px 32px!important;align-items:stretch}
.px-promo .t-l{display:flex;flex-direction:column;min-width:0}
.px-promo .t-r{min-width:0;border-left:1px solid var(--dim);padding-left:44px;display:flex;flex-direction:column;
  justify-content:center;gap:20px}
.px-promo .aud-tag{margin-bottom:18px;align-self:flex-start}
.px-promo .t-head{display:flex;align-items:center;gap:24px;margin:0 0 18px}
.px-promo .t-name h3{font-family:var(--display);font-size:36px;line-height:1.05;letter-spacing:.02em;margin:0 0 10px;color:var(--fg)}
.px-promo .promo-amt{display:block;font-size:36px!important;line-height:1}
.px-promo .p-text{font-size:16px;color:var(--mute);line-height:1.6;margin:0;max-width:60ch}
.px-promo .promo-cell{gap:8px}
.px-promo .promo-t{font-size:48px!important}
.px-promo .promo-steps{grid-area:auto!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;margin:0!important}
@media(max-width:860px){
  #consult .promo-b.px-promo{grid-template-columns:1fr!important;padding:22px 18px!important}
  .px-promo .t-r{border-left:0;padding-left:0;border-top:1px solid var(--dim);padding-top:18px;margin-top:20px}
  .px-promo .t-head{flex-direction:column;align-items:flex-start;gap:14px}
  .px-promo .t-name h3{font-size:30px}
}
/* the narrowest phones: a one-word title in a long language ("AKTIONSGUTHABEN") stays on screen (2026-11-22) */
@media(max-width:360px){ .px-promo .t-name h3{font-size:26px} }
