/* דניאל בניה | קיר העבודות
   Palette: paper #FFFFFF · ink #191613 · muted #7A756E · chip #F1EFEC · accent #2E45FF · gold #C7A34B */

:root {
  --paper: #ffffff;
  --ink: #111111;
  --muted: #767676;
  --chip: #f1f1f1;
  --chip-hover: #e2e2e2;
  --accent: #2e45ff;
  --pinred: #e60023;
  --gold: #c7a34b;
  --gold-bg: #faf6ec;
  --radius: 16px;
  --gap: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#prerender { max-width: 760px; margin: 0 auto; }
.predoc { padding: 20px 18px; }
.predoc h1 { font-size: 28px; margin: 4px 0 12px; }
.predoc .peyebrow { color: #767676; margin-bottom: 4px; }
.predoc p { font-size: 16px; line-height: 1.7; margin-bottom: 10px; }
.predoc img { width: 100%; border-radius: 16px; margin: 12px 0; }
.predoc a { color: #2e45ff; font-weight: 600; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, 'Helvetica Neue', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--paper);
}
.me { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; object-position: top;
}

.search {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--chip); border-radius: 24px;
  height: 48px; padding: 0 18px;
  transition: box-shadow .15s;
}
.search:focus-within { box-shadow: 0 0 0 3px var(--accent); }
.search svg { width: 18px; height: 18px; fill: var(--muted); flex-shrink: 0; }
.search input {
  flex: 1; border: 0; background: none; font: inherit; font-size: 15px;
  color: var(--ink); outline: none; min-width: 0;
}
.search input::placeholder { color: var(--muted); }

/* ---------- Chips ---------- */
.chips {
  display: flex; gap: 28px;
  padding: 16px 24px 12px;
  background: var(--paper);
  overflow-x: auto; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 0; background: none; color: var(--ink);
  position: relative; padding: 0 1px 10px;
  font-size: 15.5px; font-weight: 600; white-space: nowrap;
}
.chip::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0;
  height: 3px; border-radius: 2px; background: transparent;
}
.chip.on::after { background: var(--ink); }

/* ---------- Board (masonry) ---------- */
main { padding: 4px 24px 60px; }
.board { position: relative; }
.pin {
  position: absolute; top: 0; right: 0;
  display: block;
  animation: pinin .3s ease backwards;
}
@keyframes pinin { from { opacity: 0; transform: translateY(10px); } }

.ph {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: var(--chip);
}
.ph img { width: 100%; }
.ph.capped { aspect-ratio: 1 / 1.3; }
.ph.capped img { height: 100%; object-fit: cover; }
.ph.ratio169 { aspect-ratio: 16 / 9; }
.ph.ratio169 img { height: 100%; object-fit: cover; }
.ph.awardph {
  aspect-ratio: 1 / 1; background: var(--gold-bg);
  display: flex; align-items: center; justify-content: center; padding: 24%;
}
.ph.awardph img { max-height: 100%; object-fit: contain; }

.ph::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  border-radius: inherit; pointer-events: none;
  background: rgba(0, 0, 0, .045);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.ov {
  position: absolute; inset: 0; z-index: 2;
  background: rgba(25, 22, 19, .3);
  opacity: 0; transition: opacity .18s;
  display: flex; align-items: flex-end; padding: 12px;
}
.pin:hover .ov, .pin:focus-visible .ov { opacity: 1; }
.ovbtn {
  background: var(--accent); color: #fff;
  border-radius: 999px; padding: 8px 16px;
  font-size: 14px; font-weight: 700;
}

.pt {
  margin: 9px 6px 0; font-size: 14.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pc { margin: 2px 4px 0; font-size: 12.5px; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 80px 0; font-size: 16px; }

/* ---------- Pin closeup ---------- */
#pinview { position: relative; padding-top: 8px; }
.back {
  position: fixed; top: 104px; inset-inline-start: 44px; z-index: 50;
  width: 40px; height: 40px; border-radius: 12px;
  border: 0; padding: 0;
  background: rgba(228, 228, 228, .18);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.back:hover { background: rgba(228, 228, 228, .5); }
.back svg { width: 22px; height: 22px; fill: var(--ink); }

.closeup {
  position: absolute; top: 0; right: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: var(--paper);
  border-radius: 32px;
  box-shadow: 0 0 20px rgba(0, 0, 0, .12);
}
.cmedia {
  display: flex; flex-direction: column; gap: 4px;
  border-radius: 0 32px 32px 0;
  overflow: hidden; overflow-y: auto;
  max-height: 88vh;
}
.cmedia img { width: 100%; cursor: zoom-in; }
.cmedia video { display: block; max-width: 100%; max-height: 84vh; margin: 0 auto; }
/* Solo video: media column hugs the video (no side gaps), text takes the rest. */
.closeup.solovid { grid-template-columns: auto 1fr; }
.closeup.solovid .cmedia { overflow: visible; }
.closeup.solovid .cmedia video { height: 84vh; max-height: 84vh; width: auto; max-width: none; margin: 0; }
.cmedia .vid {
  aspect-ratio: 16 / 9; flex-shrink: 0;
  background: #000;
}
.cmedia .vid iframe { width: 100%; height: 100%; border: 0; display: block; }
.cmedia .gal { display: grid; gap: 4px; }
.cmedia .gal.c2 { grid-template-columns: 1fr 1fr; }
.cmedia .gal.c3 { grid-template-columns: 1fr 1fr 1fr; }
.cmedia.awardmedia {
  background: var(--gold-bg);
  align-items: center; justify-content: center;
  padding: 60px;
}
.cmedia.awardmedia img { max-width: 240px; }

.cbody {
  display: flex; flex-direction: column; gap: 15px;
  padding: 24px 30px;
  min-width: 0;
}

.visit {
  display: block; background: var(--chip);
  border-radius: 24px; padding: 13px 16px;
  text-align: center; font-size: 15px; font-weight: 700;
  transition: background .15s;
}
.visit:hover { background: var(--chip-hover); }

.ctitle { font-size: 30px; line-height: 1.25; font-weight: 700; text-align: right; }
.ceyebrow { font-size: 17px; color: var(--muted); text-align: right; }
.clead { font-size: 16.5px; line-height: 1.75; }
.clead p + p { margin-top: 12px; }
.cnote { font-size: 13px; color: var(--muted); line-height: 1.6; }
.medals { display: flex; flex-direction: column; gap: 10px; font-size: 15.5px; }
.medal { display: flex; align-items: center; gap: 10px; }
.medal .dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.contact { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.contact a { color: var(--accent); font-weight: 500; }
.contact a:hover { text-decoration: underline; }



/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .topbar { padding: 10px 12px; gap: 8px; }
  .search { height: 42px; border-radius: 21px; }
  .avatar { width: 30px; height: 30px; }
  .chips { gap: 10px; padding: 8px 10px 6px; justify-content: space-between; }
  .chip { font-size: 12.5px; padding-bottom: 8px; }
  main { padding: 2px 8px 40px; }
  :root { --gap: 9px; --radius: 14px; }
  .pt { font-size: 11.5px; margin-top: 7px; }
  .pc { font-size: 10px; }
  #pinview { padding-top: 0; }
  .back {
    position: fixed; top: 74px; inset-inline-start: 20px;
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(228, 228, 228, .18);
    backdrop-filter: blur(6px);
    z-index: 50;
    padding: 0;
  }
  .back svg { width: 22px; height: 22px; }
  .closeup, .closeup.solovid { grid-template-columns: 1fr; }
  .closeup { border-radius: 20px; box-shadow: 0 0 14px rgba(0, 0, 0, .1); }
  .closeup.solovid .cmedia video { height: auto; width: 100%; max-width: 100%; margin: 0 auto; }
  .cmedia { border-radius: 20px 20px 0 0; max-height: none; }
  .cmedia.awardmedia { padding: 40px; }
  .cbody { padding: 18px 14px 14px; }
  .ctitle { font-size: 24px; }
  .ceyebrow { font-size: 15px; }
  .clead { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Fullscreen image viewer ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 10, 10, .93);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  touch-action: none;
}
.viewer img {
  max-width: 94vw; max-height: 94vh;
  user-select: none; -webkit-user-drag: none;
  cursor: grab;
}
.viewer img.dragging { cursor: grabbing; }
.vbtn {
  position: absolute; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  backdrop-filter: blur(4px);
}
.vbtn:hover { background: rgba(255, 255, 255, .3); }
.vclose { top: 16px; inset-inline-start: 16px; }
.vzoom { bottom: 18px; display: flex; gap: 10px; inset-inline-start: 50%; transform: translateX(50%); position: absolute; }
.vzoom .vbtn { position: static; }
.vprev { inset-inline-start: 16px; top: 50%; margin-top: -22px; }
.vnext { inset-inline-end: 16px; top: 50%; margin-top: -22px; }
