/* yuvalrob.com
   Direction: Yuval's sketchbook. Warm paper, black ink line, his own hand lettering for titles,
   hand-inked boxes like the logo, and one colour per section taken from the illustrations. */
:root {
  --paper: #fbf9f4;
  --ink: #1f1e1c;
  --text: #3d3b37;
  --muted: #8a857c;
  --line: #e4dfd4;
  --sheet: #f1ede4;
  --tint: #e8e2d6;            /* set per section */
  --gap: 12px;
  --side: 236px;
  --mono: "Lucida Console", Monaco, Menlo, "Courier New", monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --box: url("/assets/box.svg");
  --scribble: url("/assets/scribble.svg");
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 15px/1.6 var(--sans); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px dashed var(--ink); outline-offset: 3px; }
.hand { display: block; height: 1em; width: auto; fill: var(--ink); overflow: visible; }

/* ---------- sidebar */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); padding: 26px 24px; display: flex; flex-direction: column; z-index: 20; background: var(--paper); }
.logo { display: block; width: 172px; mix-blend-mode: multiply; }
.logo img { width: 100%; }
.menu-btn { display: none; }
.side-body { display: flex; flex-direction: column; flex: 1; margin-top: 26px; }
.side nav ul, .social { list-style: none; margin: 0; padding: 0; }
.side nav a { position: relative; display: inline-block; padding: 1px 8px; margin-left: -8px; font: 14px/1.7 var(--mono); color: var(--ink); text-decoration: none; }
.side nav a::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 1px; height: 6px; background: var(--scribble) no-repeat center / 100% 100%; opacity: 0; transition: opacity .15s; }
.side nav a:hover::after { opacity: .55; }
.side nav a.on { background: var(--tint); }
.side nav a.on::before { content: ""; position: absolute; inset: -1px -2px; background: var(--box) no-repeat center / 100% 100%; }
.side-foot { margin-top: auto; font: 10px/1.4 var(--sans); color: var(--muted); }
.social { display: flex; gap: 12px; margin-bottom: 10px; }
.social svg { width: 15px; height: 15px; fill: var(--ink); }
.social a:hover svg { fill: var(--muted); }
.side-foot p { margin: 0; }

main { margin-left: var(--side); padding: 26px 26px 72px 0; min-height: 100vh; }

/* ---------- page heading: hand lettering on a strip of the section colour */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 22px; margin: 6px 0 22px; }
.page-head h1 { position: relative; margin: 0; padding: 6px 14px 4px 10px; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; }
.page-head h1::before { content: ""; position: absolute; left: 0; right: 0; top: 38%; bottom: -2px; background: var(--tint); transform: rotate(-1.2deg); z-index: -1; border-radius: 2px; }
.page-head h1 { isolation: isolate; }
.page-head p { margin: 0 0 4px; font: 12px/1.5 var(--mono); color: var(--muted); }
.page-head p a { color: var(--ink); text-decoration: none; background: var(--scribble) no-repeat left bottom / 100% 5px; padding-bottom: 3px; }

/* ---------- gallery grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.tile { position: relative; display: block; aspect-ratio: 1; background: var(--sheet); cursor: zoom-in; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: -5px; background: var(--box) no-repeat center / 100% 100%; opacity: 0; transition: opacity .15s; pointer-events: none; }
.tile:hover::after, .tile:focus-visible::after { opacity: 1; }
.tile .tag { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 3px 8px; background: var(--paper); font: 12px/1.4 var(--mono); color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.tile:hover .tag, .tile:focus-visible .tag { opacity: 1; transform: none; }

/* stories look like a small stack of sheets */
.story-tile .sheets, .story-tile .sheets::before { position: absolute; inset: 0; background: var(--tint); }
.story-tile .sheets { transform: translate(6px, -6px) rotate(1.6deg); z-index: -1; box-shadow: 0 0 0 1px rgba(31,30,28,.12); }
.story-tile .sheets::before { content: ""; transform: translate(5px, -5px) rotate(1.4deg); opacity: .6; }
.story-tile { isolation: isolate; z-index: 0; }
.story-tile .multi { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; fill: #fff; filter: drop-shadow(0 0 2px rgba(0,0,0,.45)); }
.story-tile .tag { opacity: 1; transform: none; }

/* ---------- home */
.home-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); margin-top: var(--gap); }
.home-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; text-decoration: none; background: var(--sheet); }
.home-tile img, .home-tile video { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.home-tile:hover img, .home-tile:hover video { transform: scale(1.025); }
.home-tile .label { position: absolute; left: 14px; bottom: 14px; padding: 8px 12px 6px; background: var(--tint); font-size: 22px; }
.home-tile .label::before { content: ""; position: absolute; inset: -2px; background: var(--box) no-repeat center / 100% 100%; }

.promo { display: grid; grid-template-columns: 1.6fr 1fr; background: #f2efe8; text-decoration: none; color: var(--ink); position: relative; }
.promo::after { content: ""; position: absolute; inset: -4px; background: var(--box) no-repeat center / 100% 100%; pointer-events: none; }
.promo-text { padding: clamp(24px, 4vw, 48px); align-self: center; }
.eyebrow { margin: 0 0 14px; font: 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.promo h2 { margin: 0 0 16px; font-size: clamp(30px, 3.6vw, 46px); }
.promo p { margin: 0 0 22px; max-width: 34em; font-size: 16px; }
.promo-img { background: #dfe6df; display: grid; place-items: center; padding: 24px; }
.promo-img img { max-height: 300px; width: auto; }

/* ---------- buttons: ink box like the logo */
.btn { position: relative; display: inline-block; padding: 10px 18px; background: var(--paper); color: var(--ink); font: 14px var(--mono); text-decoration: none; border: 0; cursor: pointer; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--box) no-repeat center / 100% 100%; }
.btn:hover { background: var(--tint); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: #000; }
.promo .btn { background: var(--ink); color: var(--paper); }

/* ---------- text pages */
.text-page { max-width: 760px; }
.text-page p { max-width: 64ch; }
.text-page a:not(.btn) { color: var(--ink); text-decoration: none; background: var(--scribble) no-repeat left bottom / 100% 5px; padding-bottom: 2px; }
.post { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px dashed var(--line); }
.post h2 { margin: 0; font: 400 19px var(--mono); color: var(--ink); }
.post time { display: block; margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
.post-media { display: grid; gap: var(--gap); margin-top: 18px; }
.video { position: relative; aspect-ratio: 16 / 9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.promises .cover { max-width: 520px; margin-bottom: 18px; }
.spreads { display: grid; gap: var(--gap); margin-top: 28px; }
.contact img { width: 220px; margin-bottom: 18px; }

/* ---------- carousel (Instagram-style: one frame at a time) */
.carousel { position: relative; outline: none; }
.car-track { display: flex; margin: 0; padding: 0; list-style: none; aspect-ratio: var(--ratio); overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; background: var(--sheet); }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.car-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.car-count { position: absolute; top: 12px; right: 12px; padding: 2px 9px; border-radius: 12px; background: rgba(31,30,28,.66); color: #fff; font: 12px var(--mono); }
.car-btn { position: absolute; top: calc(50% - 14px); width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(251,249,244,.92); box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; display: grid; place-items: center; transform: translateY(-50%); }
.car-btn[hidden] { display: none; }
.car-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.car-prev { left: 10px; } .car-next { right: 10px; }
.car-next.to-next { width: auto; padding: 0 10px 0 12px; border-radius: 16px; gap: 4px; display: flex; align-items: center; font: 12px var(--mono); }
.car-dots { display: flex; justify-content: center; gap: 4px; padding: 10px 0 2px; }
.car-dot { width: 6px; height: 6px; border-radius: 50%; background: #cfc9bd; transition: background .2s, transform .2s; }
.car-dot.on { background: var(--ink); transform: scale(1.15); }
@media (hover: none) { .car-btn { display: none; } }

/* ---------- lightbox / story viewer */
.lb { position: fixed; inset: 0; z-index: 50; background: var(--paper); display: none; }
.lb.open { display: grid; grid-template-rows: 1fr auto; }
.lb-stage { position: relative; display: grid; place-items: center; padding: 48px 76px 6px; min-height: 0; }
.lb-stage > img, .lb-stage > video { max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain; animation: lb-in .25s ease; }
.lb-stage .carousel { width: min(100%, calc((100vh - 170px) * var(--r, 1))); animation: lb-in .25s ease; }
@keyframes lb-in { from { opacity: 0; transform: translateY(6px); } }
.lb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; padding: 10px 20px 22px; min-height: 64px; }
.lb-cap { font: 15px var(--mono); color: var(--ink); text-align: center; }
.lb-pos { font: 12px var(--mono); color: var(--muted); }
.lb-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.lb-buy .also { font: 12px var(--mono); color: var(--muted); }
.lb-buy .also a { color: var(--ink); text-decoration: none; background: var(--scribble) no-repeat left bottom / 100% 5px; padding-bottom: 2px; }
.lb-btn { position: absolute; border: 0; background: none; padding: 10px; cursor: pointer; color: #6d685f; }
.lb-btn:hover { color: var(--ink); }
.lb-btn svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
.lb-close { top: 10px; right: 12px; } .lb-close svg { width: 22px; height: 22px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); } .lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
body.lb-on { overflow: hidden; }

/* ---------- internal store report */
.report .stats { font: 14px var(--mono); }
.report h2 { margin: 36px 0 12px; font: 400 17px var(--mono); color: var(--ink); }
.miss { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.miss figure { margin: 0; }
.miss img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.miss figcaption { font: 11px/1.3 var(--mono); margin-top: 4px; }
.miss small, .only small { display: block; color: var(--muted); }
.report table { border-collapse: collapse; width: 100%; font: 13px var(--mono); }
.report td, .report th { padding: 6px 8px; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: middle; }
.report td img { width: 56px; height: 56px; object-fit: cover; }
.report td a { margin-right: 8px; }
.only { columns: 2; font: 12px/1.5 var(--mono); }
.only small { display: inline; }

/* ---------- tablet & phone */
@media (max-width: 899px) {
  :root { --gap: 8px; }
  .side { position: sticky; top: 0; inset: auto; width: auto; height: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .logo { width: 128px; }
  .menu-btn { display: grid; gap: 5px; padding: 10px 6px; background: none; border: 0; cursor: pointer; }
  .menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .side-body { display: none; position: fixed; inset: 62px 0 0 0; margin: 0; padding: 20px 16px 28px; background: var(--paper); overflow-y: auto; }
  .side.open .side-body { display: flex; }
  .side nav a { font-size: 18px; line-height: 2.1; }
  .side-foot { margin-top: 24px; font-size: 12px; }
  .social svg { width: 20px; height: 20px; }
  main { margin: 0; padding: 4px 16px 56px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tile .tag { display: none; }
  .story-tile .tag { display: block; font-size: 11px; left: 6px; bottom: 6px; }
  .lb-stage { padding: 52px 0 6px; }
  .lb-prev, .lb-next { display: none; }
  .only { columns: 1; }
}
@media (max-width: 600px) {
  .promo { grid-template-columns: 1fr; }
  .promo-img { order: -1; padding: 20px; }
  .promo-img img { max-height: 220px; }
  .home-grid { grid-template-columns: 1fr; }
  .home-tile .label { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .car-track { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
