/* LLL — "Join us": a Mac window in the family of the lets-talk window (its
   size, place and light plastic pane), opened over the page one is on. The
   page behind is only darkened, never blurred (client, 2026-11-19). The
   window wears her title bar and lights (media/cases/win-*.webp, cut from
   her lets-talk graphic); fields, Send and the alert sheet follow the
   lets-talk window (lets-talk.css). Behaviour: join.js. */

.jn {
  --pane: #eff1f4;
  --field: #f3f4f7;
  --text: #1d1d1f;
  --text-2: #4a4c52;
  --aqua: rgba(58, 134, 232, .5);
  position: fixed;
  inset: 0;
  z-index: 51;
  -webkit-tap-highlight-color: transparent;
}
.jn[hidden] { display: none; }
.jn-dim {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 6, .42);   /* as behind lets-talk */
  opacity: 0;
  transition: opacity .12s ease;
}
.jn.is-open .jn-dim { opacity: 1; }

/* ─── The window ──────────────────────────────────────────────────────── */
.jn-win {
  --bar: max(30px, min(6.5vw, 4.4dvh));
  position: absolute;
  left: 50%;
  top: 51%;
  /* The lets-talk window's size and place (lets-talk.js: at most 70 % of
     the painting's height, its shape 2265 × 3351, centred at 51 %). */
  --jw: min(calc(100vw - 32px), 47.3dvh);
  width: var(--jw);
  /* A set height, not aspect-ratio: Safari let the box grow to the whole
     form (client, 2026-11-20: "it runs from the very top to the very
     bottom"), so the pane never scrolled. */
  height: calc(var(--jw) * 3351 / 2265);
  translate: -50% -50%;
  display: flex;
  flex-direction: column;
  border-radius: 10px 10px 8px 8px;
  background: linear-gradient(#f3f4f6, #e8eaee);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .25);
  overflow: hidden;
  font-family: "Lucida Grande", "Lucida Sans Unicode", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  opacity: 0;
  transition: opacity .12s ease;
}
.jn.is-open .jn-win { opacity: 1; }
.jn-win:focus { outline: none; }
.jn-win.is-full {
  top: calc(68px + env(safe-area-inset-top));
  bottom: 8px;
  width: min(calc(100vw - 16px), 66.7dvh);
  height: auto;
  translate: -50% 0;
}

.jn-bar {
  position: relative;
  flex: none;
  height: var(--bar);
  background: url("../media/cases/win-bar.webp?v=1") 0 0 / 100% 100%;
  user-select: none;
  -webkit-user-select: none;
}
.jn-bar::before {
  content: "";
  position: absolute;
  left: calc(var(--bar) * 30 / 101);
  top: calc(var(--bar) * 8 / 101);
  width: calc(var(--bar) * 238 / 101);
  height: calc(var(--bar) * 88 / 101);
  background: url("../media/cases/win-lights.webp?v=1") 0 0 / 100% 100%;
  pointer-events: none;
}
.jn-bar-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: calc(var(--bar) * .36);
  color: #2a2a2e;
  pointer-events: none;
}
.jn-lights {
  position: absolute;
  left: calc(var(--bar) * 41 / 101);
  top: calc(var(--bar) * 21 / 101);
  width: calc(var(--bar) * 216 / 101);
  height: calc(var(--bar) * 56 / 101);
  z-index: 1;
}
.jn-light {
  position: absolute;
  top: 0;
  width: calc(var(--bar) * 56 / 101);
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: var(--cur-hand, pointer);
  -webkit-tap-highlight-color: transparent;
}
.jn-light i {
  font: 600 calc(var(--bar) * .36)/1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-style: normal;
  opacity: 0;
  transition: opacity .15s ease;
}
.jn-light:nth-child(1) { left: 0; color: rgba(90, 0, 0, .72); }
.jn-light:nth-child(2) { left: calc(var(--bar) * 80 / 101); color: rgba(90, 50, 0, .78); }
.jn-light:nth-child(3) { left: calc(var(--bar) * 160 / 101); color: rgba(10, 60, 0, .78); }
.jn-lights:hover i, .jn-light:focus-visible i { opacity: 1; }
.jn-light:focus { outline: none; }

/* ─── The form ────────────────────────────────────────────────────────── */
.jn-body { flex: 1 1 auto; min-height: 0; display: flex; }
.jn-pane {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;   /* the Aqua bar beside it stands in */
  margin: 0;
  padding: 18px 16px 22px 20px;
  display: flex;
  flex-direction: column;
}
.jn-pane > * { flex: none; }   /* the pane scrolls; its fields never shrink */
.jn-title {
  margin: 0 0 6px;
  font: 700 22px/1.15 "Lucida Grande", "Helvetica Neue", Arial, sans-serif;
  color: #7b0f28;
}
.jn-lead { margin: 0 0 12px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.jn-label { margin: 12px 0 5px; font-size: 13px; font-weight: 700; line-height: 1.3; }

.jn-field {
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(#e9ebef, var(--field) 5px);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(0, 0, 0, .14);
  font: inherit;
  font-size: 16px;   /* 16 px: no zoom-in on iPhone */
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.jn-field:focus { outline: none; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .28), 0 0 0 3px var(--aqua); }
.jn-area { height: auto; min-height: 96px; padding: 9px 11px; line-height: 1.35; resize: none; }

/* Pop-up menu: a raised Aqua button with the double arrow, as on a Mac. */
.jn-select { position: relative; }
.jn-select select {
  padding-right: 40px;
  background: linear-gradient(#fdfdfe, #e8eaee);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, .18);
  cursor: var(--cur-hand, pointer);
}
.jn-select select:invalid { color: #8a8d94; }
.jn-select::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  width: 26px;
  border-radius: 5px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16'%3E%3Cpath d='M2 6l3-3 3 3M2 10l3 3 3-3' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 9px 15px no-repeat,
    linear-gradient(#6aa8f5, #2a6fd6);
  pointer-events: none;
}

/* Send: her lets-talk burgundy, glossy. */
.jn-send {
  margin-top: 22px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  font: 700 16px/1 "Lucida Grande", "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .35);
  background:
    linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.18) 46%, rgba(255,255,255,0) 50%),
    linear-gradient(#b8405e, #8a1532 49%, #6c0b21 51%, #7a1029 85%, #932040);
  box-shadow: inset 0 0 0 1px rgba(60, 0, 15, .55), 0 2px 4px rgba(0, 0, 0, .25);
  cursor: var(--cur-hand, pointer);
  -webkit-appearance: none;
  appearance: none;
}
.jn-send:active { filter: brightness(.85); }
.jn-send:focus { outline: none; }
.jn-send:focus-visible { box-shadow: inset 0 0 0 1px rgba(60, 0, 15, .55), 0 0 0 3px var(--aqua); }
.jn-send[aria-busy="true"] { cursor: progress; }

/* ─── Alert sheet: hangs from the title bar (as in lets-talk) ─────────── */
.jn-msg {
  position: fixed;
  z-index: 5;
  box-sizing: border-box;
  padding: 18px 18px 14px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(#f1f2f5, #e3e5ea);
  box-shadow: 0 0 0 1px rgba(0,0,0,.16), 0 10px 30px rgba(0,0,0,.35);
  font-family: "Lucida Grande", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  transform-origin: top center;
  animation: jn-sheet .28s cubic-bezier(.2, .8, .25, 1);
}
.jn-msg[hidden] { display: none; }
@keyframes jn-sheet { from { transform: scaleY(.15); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .jn-msg { animation: none; } }
.jn-msg-body { display: flex; gap: 14px; align-items: flex-start; }
.jn-msg-text { font-size: 14.5px; line-height: 1.35; min-width: 0; }
.jn-msg-text p { margin: 0; }
.jn-msg-text .jn-msg-head { font-weight: 700; }
.jn-msg-text p + p { margin-top: 6px; color: var(--text-2); }
.jn-msg-ico {
  flex: none;
  width: 38px;
  height: 34px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 58'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23e0587a'/><stop offset='.55' stop-color='%237b0f28'/><stop offset='1' stop-color='%23560a1b'/></linearGradient><linearGradient id='h' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23fff' stop-opacity='.85'/><stop offset='1' stop-color='%23fff' stop-opacity='0'/></linearGradient></defs><path d='M32 56C14 42 2 31 2 17 2 8 9 2 17 2c6 0 11 3 15 9 4-6 9-9 15-9 8 0 15 6 15 15 0 14-12 25-30 39z' fill='url(%23g)' stroke='%23400713' stroke-width='1.5'/><path d='M10 14c2-6 9-8 14-5-5 1-9 4-11 10z' fill='url(%23h)'/><ellipse cx='45' cy='12' rx='6' ry='3.5' fill='url(%23h)' transform='rotate(20 45 12)'/></svg>") center / contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
.jn-msg-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.jn-msg-ok {
  min-width: 84px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  font: 700 15px/1 "Lucida Grande", "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0,0,0,.35);
  background:
    linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.18) 46%, rgba(255,255,255,0) 50%),
    linear-gradient(#b8405e, #8a1532 49%, #6c0b21 51%, #7a1029 85%, #932040);
  box-shadow: inset 0 0 0 1px rgba(60,0,15,.55), 0 2px 4px rgba(0,0,0,.25);
  cursor: var(--cur-hand, pointer);
}
.jn-msg-ok:active { filter: brightness(.85); }

/* ─── Aqua scroll bar (client's reference): a pale groove with rounded ends,
   a glossy blue pill for the thumb, both arrows together at the bottom. ── */
.jn-pane::-webkit-scrollbar { display: none; }
.jn-scroll {
  flex: none;
  width: 15px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(0, 0, 0, .12);
  background: linear-gradient(90deg, #e2e2e2, #f6f6f6 45%, #fdfdfd 70%, #ececec);
}
.jn-scroll.is-idle .jn-thumb { visibility: hidden; }
.jn-track {
  position: relative;
  flex: 1 1 auto;
  margin: 3px 2px 2px;
  border-radius: 6px;
  background: linear-gradient(90deg, #cfcfcf, #ececec 40%, #f9f9f9 65%, #dedede);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(0, 0, 0, .08);
  cursor: var(--cur-hand, pointer);
}
.jn-thumb {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--t, 0px);
  height: var(--h, 40px);
  min-height: 22px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.75) 42%, rgba(255,255,255,.2) 55%, rgba(255,255,255,0) 75%),
    linear-gradient(90deg, #2f6fd2, #6aa6f2 35%, #9cc6fb 50%, #5b98ea 68%, #2a62c4);
  box-shadow: inset 0 0 0 1px rgba(16, 58, 140, .7), 0 1px 2px rgba(0, 0, 0, .25);
  cursor: var(--cur-grab, grab);
}
.jn-thumb::after {   /* the soft ribbing in the middle of an Aqua thumb */
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 50%;
  height: 7px;
  translate: 0 -50%;
  background: repeating-linear-gradient(rgba(20, 60, 140, .35) 0 1px, transparent 1px 3px);
  border-radius: 2px;
}
.jn-scroll.is-dragging .jn-thumb { cursor: var(--cur-grabbing, grabbing); }
.jn-arrow {
  flex: none;
  height: 15px;
  padding: 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, .14);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 6'%3E%3Cpath d='M4 0l4 6H0z' fill='%23333'/%3E%3C/svg%3E") center / 7px 5px no-repeat,
    linear-gradient(90deg, #dcdcdc, #f8f8f8 50%, #e4e4e4);
  cursor: var(--cur-hand, pointer);
}
.jn-down { background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 6'%3E%3Cpath d='M0 0h8L4 6z' fill='%23333'/%3E%3C/svg%3E"),
    linear-gradient(90deg, #dcdcdc, #f8f8f8 50%, #e4e4e4); }
.jn-arrow:active { filter: brightness(.85); }

/* ─── Laptop and tablet held sideways (client, 2026-11-20, her orange box
   on a laptop screenshot): as wide as the phone's window, but lower — 63 %
   of the screen's height, centred, room above and below; the form scrolls
   inside, the Aqua bar at its side. */
@media (min-aspect-ratio: 4/3) and (min-height: 600px) {
  .jn-win:not(.is-full) { top: 50%; height: 63dvh; }
}
