/* Shared look of all film pages (home, more films, my camera, docu). Fonts: /fonts/fonts.css */

  * { box-sizing: border-box; }
  body { margin:0; background:#fff; color:#111; font-family:-apple-system, "Segoe UI", Arial, sans-serif; }
  /* Header copied from the Wix site: image 166px, 114px from the top; title Figtree Light 25px (free font); grey line 980px */
  header { text-align:center; padding:114px 16px 0; }
  header img { width:166px; height:166px; border-radius:50%; object-fit:cover; display:block; margin:0 auto 23px; }
  header h1 { font-family:"Figtree", sans-serif; font-size:25px; line-height:30px; font-weight:300; color:#404040; margin:0; white-space:pre; }
  header hr { max-width:980px; margin:37px auto 0; border:0; border-top:1px solid rgba(210,210,210,.78); }
  /* Page title and bottom link, like the Wix docu page: Figtree Light 23px */
  header > a { display:block; width:166px; margin:0 auto 23px; border-radius:50%; }
  header > a img { margin:0; }
  .pagetitle, .more { font-family:"Figtree", sans-serif; font-size:23px; line-height:53px; font-weight:300; color:#404040; text-align:center; margin:15px 0 0; }
  .more { display:block; text-decoration:none; margin:40px 0 80px; }
  .more:hover { text-decoration:underline; }
  /* thin lines above and below the bottom link, like the line under the header */
  .morebox { margin:40px 0 60px; }
  .morebox hr { max-width:980px; margin:0 auto; border:0; border-top:1px solid rgba(210,210,210,.78); }
  .morebox .more { margin:22px 0; }

  /* As many films per row as fit: phone 1, laptop 3, big screen 4–5 */
  .grid { margin:29px 0 0; padding:0 50px; display:grid;
          grid-template-columns:repeat(var(--cols,3), 1fr); gap:5px; }
  @media (max-width:600px) { .grid { padding:0 12px; } }
  main > .grid:first-child { margin-top:90px; }   /* page without a title (home): like Wix, 90px under the line */
  /* tall (vertical) films: their own row of tall pictures, 6 per row on a computer, 3 on a tablet, 2 on a phone */
  .vgrid { margin:29px 0 0; padding:0 50px; display:grid; grid-template-columns:repeat(6, 1fr); gap:5px; }
  .vgrid .tile { aspect-ratio:9/16; }
  .vgrid + .grid { margin-top:5px; }
  @media (max-width:900px) { .vgrid { grid-template-columns:repeat(3, 1fr); } }
  @media (max-width:600px) { .vgrid { padding:0 12px; grid-template-columns:repeat(2, 1fr); } }
  footer { margin-top:60px; }
  .morebox + footer { margin-top:0; }
  .tile .ytprev { position:absolute; left:0; right:0; top:-50%; height:200%; opacity:0; transition:opacity .35s; pointer-events:none; }
  .tile .ytprev iframe { width:100%; height:100%; border:0; pointer-events:none; }
  .tile.previewing .ytprev { opacity:1; }
  .tile .vprev { position:absolute; inset:0; opacity:0; transition:opacity .35s; pointer-events:none; background:#000; }
  .tile .vprev iframe { width:100%; height:100%; border:0; pointer-events:none; }
  .tile.previewing .vprev { opacity:1; }
  .tile { position:relative; aspect-ratio:16/9; overflow:hidden; border-radius:3px; isolation:isolate; background:#000; cursor:pointer; border:0; padding:0; display:block; width:100%; }
  .tile .bg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
  .tile video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity .35s; }
  /* gentle zoom-in of the picture when the mouse is over it (the frame stays the same size) */
  .tile .bg, .tile video, .tile .ytprev, .tile .vprev { transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .35s; }
  /* --pcrop / --vcrop hide black bars baked into a picture / a film */
  .tile .bg { transform: scale(var(--pcrop, 1)); }  .tile .ytprev { transform: scale(var(--vcrop, 1)); }
  @media (hover: hover) { .tile:hover .bg { transform: scale(calc(var(--pcrop, 1) * 1.05)); } .tile:hover video { transform: scale(1.05); }
                          .tile:hover .ytprev { transform: scale(calc(var(--vcrop, 1) * 1.05)); } .tile:hover .vprev { transform: scale(1.05); } }
  /* small play sign in the middle */
  .tile .play { position:absolute; left:50%; top:50%; width:38px; height:38px; margin:-19px 0 0 -19px; z-index:1;
                filter:drop-shadow(0 1px 3px rgba(0,0,0,.6)); transition: opacity .3s; }
  .tile .play::before { content:""; position:absolute; left:13px; top:10px; border-style:solid; border-width:9px 0 9px 15px; border-color:transparent transparent transparent #fff; }
  .tile.previewing .play { opacity:.0; }
  .tile.previewing video { opacity:1; }
  .tile::after { content:""; position:absolute; inset:0; background:linear-gradient(transparent 50%, rgba(0,0,0,.55)); pointer-events:none; }
  .tile .name { position:absolute; left:14px; bottom:10px; z-index:1; color:#fff; font:400 20px/1 "Anton", sans-serif; -webkit-text-stroke:.6px #fff; letter-spacing:.01em; text-shadow:0 0 2px rgba(0,0,0,.55), 0 1px 6px rgba(0,0,0,.6); }   /* soft dark edge: the white name stays readable on bright pictures (accessibility contrast) */
  .tile .tag { position:absolute; right:10px; top:10px; z-index:1; font-size:11px; color:#fff; background:rgba(0,0,0,.55); padding:3px 8px; border-radius:999px; direction:rtl; }

  /* Player window */
  /* Like Wix: dark backdrop, a little see-through, blurred page behind; film name under the video */
  .lb { position:fixed; inset:0; background:rgba(45,45,45,.6); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
        z-index:100; display:flex; flex-direction:column; align-items:center; justify-content:center; opacity:0; pointer-events:none; transition:opacity .25s; }
  .lb.open { opacity:1; pointer-events:auto; }
  /* --ar = the film's own shape (wider films get a wider window, so nothing is cut and there are no bars) */
  .lb .stage { position:relative; width:min(100vw, calc((100dvh - 170px) * var(--ar, 1.7778))); aspect-ratio:var(--ar, 1.7778); background:#000; }
  @media (min-width:900px) { .lb .stage { width:min(56vw * var(--ar, 1.7778) / 1.7778, 90vw, calc((100dvh - 200px) * var(--ar, 1.7778))); } }
  /* tall (vertical) film: the window uses the screen's height */
  .lb.tall .stage { width:min(100vw, calc((100dvh - 170px) * 9 / 16)); }
  @media (min-width:900px) { .lb.tall .stage { width:min(90vw, calc((100dvh - 200px) * 9 / 16)); } }
  .lb .lbname { margin-top:clamp(24px, 9vh, 80px); font-family:"Anton", sans-serif; -webkit-text-stroke:.6px #eee; font-size:clamp(24px, 2vw, 36px); color:#eee; letter-spacing:.01em; text-align:center; padding:0 16px; }
  .lb video, .lb iframe { position:absolute; inset:0; width:100%; height:100%; border:0; background:#000; }
  .lb .close { position:absolute; top:max(14px, env(safe-area-inset-top)); right:14px; z-index:5; width:48px; height:48px; border:0; background:transparent; cursor:pointer; padding:0; }
  .lb .close::before, .lb .close::after { content:""; position:absolute; left:8px; right:8px; top:50%; height:1.5px; background:#fff; }
  /* Thin arrows on the sides: previous / next film */
  .lb .nav { position:absolute; top:50%; margin-top:-40px; width:56px; height:80px; border:0; background:transparent; cursor:pointer; z-index:5; padding:0; }
  .lb .nav::before { content:""; position:absolute; left:50%; top:50%; width:22px; height:22px; border:solid #fff; border-width:1.5px 1.5px 0 0; }
  .lb .nav.next { right:10px; } .lb .nav.next::before { transform:translate(-70%,-50%) rotate(45deg); }
  .lb .nav.prev { left:10px; }  .lb .nav.prev::before { transform:translate(-30%,-50%) rotate(-135deg); }
  @media (max-width:899px) { .lb .nav { top:auto; bottom:max(20px, env(safe-area-inset-bottom)); margin:0; } }
  .lb .close::before { transform:rotate(45deg); } .lb .close::after { transform:rotate(-45deg); }
  .lb .msg { color:#bbb; font-size:15px; direction:rtl; text-align:center; padding:20px; }
  .end { position:absolute; inset:0; display:none; flex-direction:column; align-items:center; justify-content:center; gap:14px; background:rgba(0,0,0,.94); color:#fff; z-index:4; }
  .end.show { display:flex; }
  .end button { font:inherit; border:0; border-radius:999px; padding:10px 22px; cursor:pointer; }
  .end .b2 { background:transparent; color:#fff; border:1px solid #fff; }

  /* ---- נגן יוטיוב נקי (inside the film window) ---- */
  .clean { position:absolute; inset:0; overflow:hidden; background:#000; }
  /* the YouTube frame is twice as tall as the box: YouTube's top bar (logo, name) and bottom bar are cut off.
     --vcrop enlarges it a little more when the film itself has black bars */
  .clean .ytwrap { position:absolute; left:0; right:0; top:-50%; height:200%; }
  .clean .ytwrap iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
  .clean .cover { position:absolute; inset:0; z-index:3; background:#000 center/cover no-repeat; pointer-events:none; transition:opacity .25s; }
  .clean .cover.gone { opacity:0; }
  .clean .cover .big { position:absolute; left:50%; top:50%; width:60px; height:60px; margin:-30px 0 0 -30px; opacity:0; transition:opacity .2s;
                       filter:drop-shadow(0 1px 4px rgba(0,0,0,.6)); }
  .clean .cover .big::before { content:""; position:absolute; left:20px; top:15px; border-style:solid; border-width:15px 0 15px 25px; border-color:transparent transparent transparent #fff; }
  .clean .cover.needtap .big { opacity:1; }
  .clean .shield { position:absolute; inset:0; z-index:4; cursor:pointer; touch-action:none; -webkit-user-select:none; user-select:none; }
  /* double tap on a side: jump 10 seconds; a small sign shows it */
  .clean .skipfx { position:absolute; top:50%; transform:translateY(-50%); z-index:6; pointer-events:none; color:#fff; direction:ltr;
                   font:600 17px -apple-system, Arial, sans-serif; background:rgba(0,0,0,.4); border-radius:999px; padding:10px 16px; opacity:0; transition:opacity .35s; }
  .clean .skipfx.l { left:8%; } .clean .skipfx.r { right:8%; } .clean .skipfx.show { opacity:1; }
  .clean .controls { position:absolute; left:0; right:0; bottom:0; z-index:5; display:flex; align-items:center; gap:10px; direction:ltr;
                     padding:10px 12px; background:linear-gradient(transparent, rgba(0,0,0,.6)); transition:opacity .3s; }
  .clean .controls button, .clean .controls .time { filter:drop-shadow(0 0 2px rgba(0,0,0,.8)); }   /* buttons readable on bright scenes */
  .clean.idle .controls { opacity:0; }
  .clean.ad .shield, .clean.ad .controls, .clean.ad .bufspin, .clean.ad .cover { display:none; }   /* an ad is playing: YouTube's own ad buttons on top */
  .clean.idle .shield { cursor:none; }
  .clean .controls button { background:none; border:0; color:#fff; font-size:17px; width:34px; height:34px; cursor:pointer; padding:0; }
  .clean .controls .time { font:13px -apple-system, Arial, sans-serif; font-variant-numeric:tabular-nums; color:#ddd; min-width:86px; }
  .clean .controls input[type=range] { flex:1; min-width:0; accent-color:#fff; }   /* min-width:0 = the bar shrinks, so the buttons never fall outside a narrow (vertical) film */
  .clean .controls > * { flex-shrink:0; } .clean .controls > input[type=range] { flex-shrink:1; }
  .lb.tall .clean .controls { gap:6px; padding:8px; } .lb.tall .clean .controls .time { min-width:0; font-size:12px; }
  .clean:fullscreen, .clean:-webkit-full-screen { width:100%; height:100%; }
  [hidden] { display:none !important; }
  /* spinner while the film is getting ready */
  .clean .cover .spin { position:absolute; left:50%; top:50%; width:44px; height:44px; margin:-22px 0 0 -22px; border-radius:50%;
                        border:3px solid rgba(255,255,255,.3); border-top-color:#fff; opacity:0; transition:opacity .2s; animation:spin .8s linear infinite; }
  .clean .cover.loading .spin { opacity:1; }
  /* the same spinner when the film stops to load in the middle (after it has started); shown only if it lasts over .3 s */
  .clean .bufspin { position:absolute; left:50%; top:50%; width:44px; height:44px; margin:-22px 0 0 -22px; border-radius:50%; z-index:6; pointer-events:none;
                    border:3px solid rgba(255,255,255,.3); border-top-color:#fff; opacity:0; transition:opacity .2s; animation:spin .8s linear infinite; }
  .clean.buffering .bufspin { opacity:1; transition-delay:.3s; }
  .clean .cover.loading .big { opacity:0; }
  @keyframes spin { to { transform:rotate(360deg); } }
  /* Vimeo: the film's picture + spinner until the film moves */
  .vim { position:absolute; inset:0; }
  .vim .vcover { position:absolute; inset:0; z-index:3; background:#000 center/cover no-repeat; pointer-events:none; transition:opacity .25s; }
  .vsnd { position:absolute; top:12px; left:12px; z-index:6; display:flex; align-items:center; gap:8px; padding:9px 14px 9px 10px;
                border:0; border-radius:22px; background:rgba(0,0,0,.65); color:#fff; font:600 15px/1 -apple-system, "Segoe UI", Arial, sans-serif; cursor:pointer; }
  .vsnd[hidden] { display:none; }
  .vsnd svg { width:22px; height:22px; }
  .vsnd svg .waves { display:none; }
  .vim .vcover.gone { opacity:0; visibility:hidden; transition:opacity .25s, visibility 0s .25s; }
  .vim .vcover .spin { position:absolute; left:50%; top:50%; width:44px; height:44px; margin:-22px 0 0 -22px; border-radius:50%;
                       border:3px solid rgba(255,255,255,.35); border-top-color:#fff; animation:spin .8s linear infinite;
                       box-shadow:0 0 12px rgba(0,0,0,.35); }
  /* sound: white speaker + small volume bar; muted = red line across the speaker */
  .clean .vol { display:flex; align-items:center; gap:6px; }
  .clean .vol svg { width:22px; height:22px; display:block; }
  .clean .vol .x { display:none; }
  .clean .vol.muted .x { display:block; }
  .clean .vol.muted .waves { opacity:.35; }
  .clean .vol input[type=range] { width:70px; flex:none; }
  @media (hover: none) { .clean .vol input[type=range] { display:none; } }   /* phones: volume is set with the phone's buttons */
  .clean .msg { position:absolute; inset:0; z-index:7; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
                background:rgba(0,0,0,.85); color:#fff; font:15px -apple-system, Arial, sans-serif; text-align:center; padding:20px; direction:rtl; }
  .clean .msg a { color:#fff; border:1px solid #fff; border-radius:999px; padding:8px 18px; text-decoration:none; }
  /* our own full screen on iPhone: the film fills the screen, everything else hidden */
  .lb.full { background:#000; -webkit-backdrop-filter:none; backdrop-filter:none; }
  .lb.full .stage { width:min(100vw, calc(100dvh * var(--ar, 1.7778))); }
  .lb.full .lbname, .lb.full .nav, .lb.full .close { display:none; }
  /* phone held upright + wide film: the film is turned sideways so it fills the screen (turn the phone to watch) */
  .lb.full.rot { overflow:hidden; }
  .lb.full.rot .stage { flex:none; width:min(100dvh, calc(100vw * var(--ar, 1.7778))); transform:rotate(90deg); }
  html.full-on { background:#000; }

  /* ---- accessibility (IS 5568 / WCAG AA) ---- */
  /* "skip to films" link: hidden until a keyboard user presses Tab */
  .skip { position:absolute; left:12px; top:-80px; z-index:300; background:#111; color:#fff; padding:10px 16px; border-radius:4px; font-size:15px; text-decoration:none; }
  .skip:focus { top:12px; }
  main:focus { outline:none; }
  /* clear frame around whatever the keyboard is on (only for keyboard, not for mouse clicks) */
  :focus-visible { outline:3px solid #1a5fd0; outline-offset:2px; }
  .lb :focus-visible { outline-color:#fff; }
  .tile:focus-visible { outline-offset:3px; }
  .clean.idle:focus-within .controls { opacity:1; }   /* buttons stay visible while the keyboard is on them */
  footer { text-align:center; margin:0 0 40px; font-size:14px; }
  footer a { color:#555; }
  footer .dot { color:#999; margin:0 10px; }
  /* people who asked their device for less motion: no zoom on hover, no moving previews (see script), no fades */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration:.01ms !important; }
    .tile:hover .bg { transform:scale(var(--pcrop, 1)) !important; }
    .clean .cover .spin, .vim .vcover .spin { animation-duration:2s; }
  }
