/* SHORTS page (16.11.2026). Her note: "SHORTS ששם יהיו כל מיני סרטונים שעשיתי מעבודות נקודתיות (בלי CASE STUDY) סטייל רילס באינסטגרם".
   The reels idea (9:16 films, one film a screen) rebuilt in the BOOKMARK language: the notebook page on top, the projects page's white
   margins, square frames, Courier labels, the mint bar of the logo under the names, black for watching. 17.11: still covers that move on
   hover, and a viewer with its controls on the film and the neighbours faded at the sides (her notes, quoted below).
   Linked by shorts.html only (site-src/shorts.js); the header icon and the projects card are in style.css. */

/* ---------- the top: SHORTS on a page of the BOOKMARK notebook (the projects page's ruling and baselines) ---------- */
.page-shorts .sh-paper {
  --fs: var(--fs-display);
  --rl: calc(var(--fs) * .46);        /* half the title's line-height */
  --lh: calc(var(--rl) * 2);
  padding-top: calc(var(--rl) * 2); padding-bottom: calc(var(--rl) * 1.5);
  background: url("../texture/paper-grain.png?v=2") 0 0 / 128px 128px repeat,
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rl) - 1px), #D3D3D3 calc(var(--rl) - 1px) var(--rl)),
    var(--white);
}
.page-shorts #sh-title { font-size: var(--fs); line-height: var(--lh); position: relative; top: calc(var(--lh) / 2 - .363em); }
.page-shorts .sh-paper .lead { max-width: none; line-height: var(--rl); position: relative; top: calc(var(--rl) / 2 - .365em); }
html[lang="he"] .page-shorts .sh-paper .lead { top: calc(var(--rl) / 2 - .34em); }
@media (max-width: 939px) {
  .page-shorts .sh-paper { --rl: 30px; --lh: calc(var(--rl) * 3); --fs: calc(var(--lh) / .92); }
  .page-shorts #sh-title, .page-shorts .sh-paper .lead { margin-top: var(--rl); }
}
@media (max-width: 639px) { .page-shorts .sh-paper { --rl: min(30px, 9vw); --lh: calc(var(--rl) * 2); } }

/* ---------- the films: 9:16 tiles in the projects page's white margins ---------- */
.page-shorts .sh-grid-wrap { --tm: clamp(16px, 2.6vw, 50px); padding: calc(var(--tm) / 2) var(--tm) var(--tm); }
.page-shorts .sh-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: calc(var(--tm) / 2); }
@media (max-width: 1199px) { .page-shorts .sh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 899px) { .page-shorts .sh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .page-shorts .sh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.page-shorts .sh-open { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; background: var(--black); color: var(--white); }
/* 17.11.2026, her notes "קאבר מסקרן מתוך תוכן הסרטון ... סטטי ורק בהובר מתחיל לזוז" and "בקאבר לא לכתוב כלום":
   the cover alone, no name, no length; on hover its clip (starting on the same frame) fades in over it and plays */
.page-shorts .sh-open img, .page-shorts .sh-open video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .35s var(--ease); }
.page-shorts .sh-open video { opacity: 0; }
.page-shorts .sh-open.is-playing video { opacity: 1; }
.page-shorts .sh-open:hover img, .page-shorts .sh-open:hover video, .page-shorts .sh-open:focus-visible img, .page-shorts .sh-open:focus-visible video { transform: scale(1.04); }
.page-shorts .sh-open:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
/* the caption (17.11.2026, her notes "שבחוץ יהיה כתוב שם פרוייקט כמו בעמוד פרוייקטים בלי חץ רק עם מספר לייקים", "שבחוץ יהיה אפשר
   לראות כמה לייקים יש"): the projects page's caption, the name white over a soft shade at the foot, no arrow; on the far side the heart
   with the number of likes (mint once this visitor gave one; nothing while a film has none) */
.page-shorts .sh-cap { position: absolute; inset: auto 0 0 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none;
  padding: clamp(36px, 4vw, 72px) clamp(12px, 1.2vw, 20px) clamp(10px, 1.1vw, 18px);
  background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); color: var(--white); text-shadow: 0 0 12px rgba(0, 0, 0, .35); }
.page-shorts .sh-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-text); line-height: 1.2; letter-spacing: -.01em; }
.page-shorts .sh-likes { flex: none; display: none; align-items: center; gap: 5px; font-family: var(--mono); font-weight: 700; font-size: var(--fs-label); line-height: 1; letter-spacing: .04em; direction: ltr; }
.page-shorts .sh-likes.has { display: inline-flex; }
.page-shorts .sh-likes::before { content: ""; width: 14px; height: 13px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 6 18 15'%3E%3Cpath d='M12 20.2s-7.9-4.8-7.9-10.4A4.4 4.4 0 0 1 12 7.2a4.4 4.4 0 0 1 7.9 2.6c0 5.6-7.9 10.4-7.9 10.4z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 6 18 15'%3E%3Cpath d='M12 20.2s-7.9-4.8-7.9-10.4A4.4 4.4 0 0 1 12 7.2a4.4 4.4 0 0 1 7.9 2.6c0 5.6-7.9 10.4-7.9 10.4z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat; }
.page-shorts .sh-likes.mine::before { background: var(--mint); }
.page-shorts .sh-more { margin-top: var(--tm); text-align: center; }
/* until the films arrive: empty notebook frames */
.page-shorts .sh-grid--empty .sh-open { background: repeating-linear-gradient(to bottom, transparent 0 29px, #D3D3D3 29px 30px), var(--white); border: 1px solid var(--g1); }
.page-shorts .sh-soon { margin-top: var(--tm); text-align: center; }
@media (prefers-reduced-motion: reduce) { .page-shorts .sh-open img, .page-shorts .sh-open video { transition: none; } }

/* ---------- the viewer (17.11.2026, her notes: "שיהיה נוח לדפדף בין סרטונים", "שהסאונד לכבות או להדליק שיהיה על הסרטון בעת ההפעלה
   וכן X לסגירה וחיצים כדי לדפדף", "שיהיה בדסקטופ אפשר לראות בפייד את הסרטון הבא והקודם שיבינו שיש עוד והדיפדוף במקלדת יעבוד").
   Phone (a tall screen): one film a screen, swipe up for the next. Desktop (a wide screen, the deck below): the film in the middle,
   the one before and the one after faded at its sides, the arrows in the gaps between them. ---------- */
html.sh-lock { overflow: hidden; }
.sh-view { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--black); color: var(--white); overflow: hidden; }
.sh-view::backdrop { background: var(--black); }
.sh-view:focus { outline: none; }
html.bm-cursor-on .sh-view, html.bm-cursor-on .sh-view * { cursor: none; }   /* the bookmark cursor comes inside the viewer (shorts.js), one cursor only */
.sh-track { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.sh-track::-webkit-scrollbar { display: none; }
.sh-slide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; position: relative; }
.sh-film { position: relative; width: 100%; height: 100%; background: var(--black); overflow: hidden; cursor: pointer; }
.sh-film video { display: block; width: 100%; height: 100%; object-fit: contain; }
.sh-prog { position: absolute; inset: auto 0 env(safe-area-inset-bottom) 0; z-index: 2; height: 3px; background: rgba(255, 255, 255, .22); }
.sh-prog b { display: block; height: 100%; background: var(--mint); transform: scaleX(0); transform-origin: left; }
html[dir="rtl"] .sh-prog b { transform-origin: right; }
.sh-paused { position: absolute; inset: 0; margin: auto; width: 64px; height: 72px; background: var(--mint); clip-path: polygon(0 0, 100% 50%, 0 100%); opacity: 0; transform: scale(.8); transition: opacity .25s var(--ease), transform .25s var(--ease); pointer-events: none; }
.sh-slide.is-paused .sh-paused { opacity: 1; transform: none; }

/* the icons on the film: thin white line icons with a soft shadow, so they read on white films too */
.sh-ic { --ic: none; position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--white); cursor: pointer;
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .45)); transition: color .25s var(--ease); }
.sh-ic::before { content: ""; width: 26px; height: 26px; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.sh-ic:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }
@media (hover: hover) { .sh-ic:hover { color: var(--mint); } }
.sh-x { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 5.5l13 13M18.5 5.5l-13 13' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E"); }
.sh-sound { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 9.5h3.6L12 5.6v12.8l-4.9-3.9H3.5z' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M15.4 9.2a4 4 0 0 1 0 5.6M18 6.6a7.6 7.6 0 0 1 0 10.8' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.sh-sound[aria-pressed="false"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 9.5h3.6L12 5.6v12.8l-4.9-3.9H3.5z' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M15.5 9.5l5 5M20.5 9.5l-5 5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.sh-sound:disabled { opacity: .35; cursor: default; }
.sh-like { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.2s-7.9-4.8-7.9-10.4A4.4 4.4 0 0 1 12 7.2a4.4 4.4 0 0 1 7.9 2.6c0 5.6-7.9 10.4-7.9 10.4z' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.sh-like[aria-pressed="true"] { color: var(--mint); --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.2s-7.9-4.8-7.9-10.4A4.4 4.4 0 0 1 12 7.2a4.4 4.4 0 0 1 7.9 2.6c0 5.6-7.9 10.4-7.9 10.4z' fill='%23000' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.sh-like::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--mint); opacity: 0; pointer-events: none; }
.sh-like.is-pop::before { animation: sh-pop .5s var(--ease); }
.sh-like.is-pop::after { animation: sh-ring .6s var(--ease); }
@keyframes sh-pop { 0% { transform: scale(1); } 35% { transform: scale(1.38); } 70% { transform: scale(.92); } 100% { transform: scale(1); } }
@keyframes sh-ring { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.5); } }
.sh-talk { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4.6c4.6 0 8 3 8 6.8s-3.4 6.8-8 6.8c-1 0-2-.1-2.9-.4L5 19.4l1.2-3.6C4.8 14.6 4 13.1 4 11.4 4 7.6 7.4 4.6 12 4.6z' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* on the film (17.11, her note "שלא יהיה עליו כיתובים חוץ מאייקון לב ותגובה וסאונד וטיימר דקות", and "לסיפור המלא מעולה"):
   sound + the minutes timer and X at the top, the heart (its count under it) and the comment at the side, "the full story" at the foot */
.sh-top { position: absolute; inset: 0 0 auto 0; z-index: 2; display: flex; justify-content: space-between; align-items: center;
  padding: calc(6px + env(safe-area-inset-top)) 6px 24px; background: linear-gradient(rgba(0, 0, 0, .42), rgba(0, 0, 0, 0)); pointer-events: none; }
.sh-top-start { display: inline-flex; align-items: center; gap: 2px; }
.sh-time { font-family: var(--mono); font-weight: 700; font-size: var(--fs-label); line-height: 1; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--white); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.sh-acts { position: absolute; inset-inline-end: 6px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sh-top > *, .sh-acts > * { pointer-events: auto; }
.sh-act { display: flex; flex-direction: column; align-items: center; }
.sh-act .sh-lc { margin-top: -6px; font-family: var(--mono); font-weight: 700; font-size: var(--fs-label); line-height: 1; letter-spacing: .04em; color: var(--white); text-shadow: 0 1px 6px rgba(0, 0, 0, .55); }
.sh-act .sh-lc:empty { display: none; }
.sh-film::after { content: ""; position: absolute; inset: auto 0 0 0; z-index: 1; height: 140px; background: linear-gradient(to top, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0)); pointer-events: none; }
.sh-story { position: absolute; inset-inline-start: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 2; color: var(--white); font-size: var(--fs-text); text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.sh-story:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
.sh-count, .sh-arrows { display: none; }

/* ---------- the deck (a wide screen): the film in the middle, its neighbours faded at the sides ---------- */
@media (min-aspect-ratio: 1001/1000) {
  .sh-view { --fh: calc(100dvh - 2 * clamp(16px, 6vh, 64px)); --fw: calc(var(--fh) * 9 / 16); --gap: 88px; --step: calc(var(--fw) * .86 + var(--gap)); --dir: 1; }
  html[dir="rtl"] .sh-view { --dir: -1; }
  .sh-track { position: relative; overflow: hidden; scroll-snap-type: none; }
  .sh-slide { position: absolute; inset: 0; margin: auto; width: var(--fw); height: var(--fh);
    transform: translateX(calc(var(--off, 3) * var(--step) * var(--dir))) scale(.72); opacity: 0; visibility: hidden;
    transition: transform .55s var(--ease), opacity .55s var(--ease), visibility 0s linear .55s; }
  .sh-slide.is-near { opacity: .32; visibility: visible; transition: transform .55s var(--ease), opacity .55s var(--ease); }
  .sh-slide.is-near:hover { opacity: .5; }
  .sh-slide.is-on { transform: none; opacity: 1; visibility: visible; z-index: 1; transition: transform .55s var(--ease), opacity .55s var(--ease); }
  .sh-view.sh-instant .sh-slide { transition: none; }
  .sh-film { background: #111; }
  .sh-film > .sh-top, .sh-film > .sh-acts, .sh-film > .sh-prog, .sh-film > .sh-story { transition: opacity .35s var(--ease) .2s; }
  .sh-slide:not(.is-on) .sh-film > .sh-top, .sh-slide:not(.is-on) .sh-film > .sh-acts, .sh-slide:not(.is-on) .sh-film > .sh-prog,
  .sh-slide:not(.is-on) .sh-film > .sh-story { opacity: 0; visibility: hidden; transition: none; }
  .sh-prog { bottom: 0; }
  /* the count over the middle film, the arrows in the gaps beside it */
  .sh-count { display: flex; position: absolute; inset: 0 0 auto 0; z-index: 2; height: calc((100dvh - var(--fh)) / 2); margin: 0; align-items: center; justify-content: center;
    color: var(--g1); letter-spacing: .2em; pointer-events: none; }
  .sh-arrows { display: block; }
  .sh-arrows button { position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; margin-top: -24px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(0, 0, 0, .35); cursor: pointer;
    transition: border-color .3s var(--ease), background-color .3s var(--ease), opacity .3s var(--ease); }
  .sh-prev { inset-inline-start: calc(50% - var(--fw) / 2 - var(--gap) / 2 - 24px); }
  .sh-next { inset-inline-end: calc(50% - var(--fw) / 2 - var(--gap) / 2 - 24px); }
  .sh-arrows button::before { content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 22px; background: var(--white);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 22'%3E%3Cpath d='M6 21V1.5M1 6.5 6 1.5l5 5' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 22'%3E%3Cpath d='M6 21V1.5M1 6.5 6 1.5l5 5' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
  .sh-prev::before { transform: rotate(-90deg); }
  .sh-next::before { transform: rotate(90deg); }
  html[dir="rtl"] .sh-prev::before { transform: rotate(90deg); }
  html[dir="rtl"] .sh-next::before { transform: rotate(-90deg); }
  .sh-arrows button:hover:not(:disabled) { border-color: var(--mint); background: var(--mint); }
  .sh-arrows button:hover:not(:disabled)::before { background: var(--black); }
  .sh-arrows button:disabled { opacity: .2; cursor: default; }
  .sh-arrows button:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-paused, .sh-slide, .sh-film > * { transition: none !important; }
  .sh-like.is-pop::before, .sh-like.is-pop::after { animation: none; }
}
