*,*::before,*::after{box-sizing:border-box}
/* NO SCROLLING ANYWHERE — Dom, 2026-07-28: "There's no scrolling at all in this website. It is a
   fixed view." So every page is exactly one screen: the gallery fits, the work page fits, and the
   wall label on the back of a painting sets in two columns so the longest text fits without a
   scrollbar. 100dvh, not 100vh — on iOS the browser chrome makes vh taller than the visible area,
   which would push the bottom of a "fixed" page out of sight. */
html,body{margin:0;padding:0;height:100dvh;overflow:hidden}
body{background:#f7f6f3;color:#111111;font-family:Verdana,Geneva,sans-serif;line-height:1.7;
  position:relative;display:flex;flex-direction:column}
a{color:#c8102e}

/* ---- the lighting ---------------------------------------------------------
   A neon tube fixed across the very top, and the light it throws down the wall. pointer-events
   none so it never sits between Dom and anything he wants to click. */
body::before{content:"";position:fixed;top:0;left:0;right:0;height:3px;z-index:3;pointer-events:none;
  background:#ffffff;box-shadow:0 0 14px 3px rgba(255,255,255,.95),0 0 46px 12px rgba(255,246,214,.75),
  0 0 120px 40px rgba(255,240,196,.45)}
body::after{content:"";position:fixed;top:0;left:0;right:0;height:62vh;z-index:2;pointer-events:none;
  background:linear-gradient(180deg,rgba(255,252,240,.92) 0%,rgba(255,251,236,.55) 26%,
  rgba(255,250,235,.22) 58%,rgba(255,250,235,0) 100%)}
/* Everything real sits above the wash. */
.wrap,.back,footer{position:relative;z-index:4}

/* Rule 47 — the page uses the whole window. No max-width cage on the content box. */
.wrap{width:100%;padding:0 clamp(16px,3vw,56px);flex:1;min-height:0;display:flex;
  flex-direction:column}

/* ---- index: the paintings, nothing else ---------------------------------- */
.site-head{padding:clamp(20px,4vh,58px) 0 clamp(14px,2.4vh,34px);text-align:center;flex:none}
.site-head .mark{display:block;margin:0 auto clamp(2px,.5vh,8px);height:clamp(20px,3vh,38px);
  width:auto;mix-blend-mode:multiply}
.site-head h1{margin:0;font-size:clamp(22px,4vw,50px);letter-spacing:.2em;text-transform:uppercase;
  color:#111111}
.site-head a{text-decoration:none;color:#111111}
/* Grid, NOT css columns. Columns balance by height and flow top-to-bottom, so 9 paintings in a
   1728px window packed into 3 tall columns and left the right quarter of the screen empty —
   measured, not guessed. Grid fills row by row and always uses the whole width (Rule 47).
   Height is auto so every painting keeps its own proportion; nothing is cropped to a square. */
/* THE HANG — a curated wall, not a contact sheet. Six columns by three rows; three works lead at
   double size (2x2) and six sit at single, which is 3*4 + 6*1 = 18 cells for an 18-cell wall. It
   fills the screen exactly, with no dead space and no ragged last row — the thing a uniform grid
   could not do with nine paintings on a fixed view. Fixed, never random: the same arrangement every
   visit, set by "feature" in works.json, so promoting a different piece is a data change.
   aspect-ratio 2/1 on the grid (6 wide, 3 tall) is what keeps every cell exactly square, so no
   painting is ever letterboxed or cropped. */
.gallery{flex:1;min-height:0;display:grid;grid-auto-flow:dense;
  grid-template-columns:repeat(6,1fr);grid-template-rows:repeat(var(--rows,3),1fr);
  gap:clamp(10px,1.4vh,26px);aspect-ratio:6/var(--rows,3);height:100%;width:auto;max-width:100%;
  margin:0 auto;padding-bottom:clamp(10px,1.6vh,24px)}
/* Hung on the wall: a thin frame edge and a soft shadow underneath, lit from above. */
.gallery a{display:block;overflow:hidden;border:1px solid #d6d2c9;background:#ffffff;line-height:0;
  box-shadow:0 10px 26px rgba(40,34,20,.16);transition:transform .18s ease,box-shadow .18s ease}
.gallery a:hover{transform:translateY(-3px);box-shadow:0 16px 36px rgba(40,34,20,.24);
  border-color:#c8102e}
.gallery a.big{grid-column:span 2;grid-row:span 2}
.gallery img{width:100%;height:100%;object-fit:contain;background:#ffffff}

/* MOBILE — one painting at a time, swiped. Dom, 2026-07-28: "when we go in a mobile responsiveness,
   I think that we should see one by one so it becomes like a swap, like Tinder." Native CSS scroll
   snapping does it: a horizontal track, one full-width painting per stop, momentum and snap handled
   by the browser. The page still never scrolls vertically — this is a sideways swipe, not a scroll
   down the page. ponytail: no carousel library, no JS, no touch handlers. */
@media (max-width:760px){
  .gallery{display:flex;aspect-ratio:auto;width:100%;max-width:none;gap:0;
    overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;scrollbar-width:none}
  .gallery::-webkit-scrollbar{display:none}
  .gallery a,.gallery a.big{flex:0 0 100%;grid-column:auto;grid-row:auto;scroll-snap-align:center;
    display:flex;align-items:center;justify-content:center;border:0;box-shadow:none;background:none}
  .gallery a:hover{transform:none;box-shadow:none}
  .gallery img{width:auto;height:auto;max-width:92%;max-height:100%;
    border:1px solid #d6d2c9;box-shadow:0 10px 26px rgba(40,34,20,.16)}
}

/* ---- work page ------------------------------------------------------------ */
.back{display:inline-block;flex:none;margin:clamp(10px,1.8vh,26px) 0 0 clamp(16px,3vw,56px);
  color:#c8102e;text-decoration:none;font-size:clamp(10px,1.2vh,13px);letter-spacing:.16em;
  text-transform:uppercase}
.card{padding:clamp(10px,1.6vh,26px) 0 clamp(12px,2vh,30px);display:flex;flex-direction:column;
  align-items:center;flex:1;min-height:0;gap:clamp(8px,1.4vh,20px)}
.card figure{margin:0;display:flex;justify-content:center;width:100%;flex:1;min-height:0}

/* ---- the painting turns over ----------------------------------------------
   Dom, 2026-07-28: "when I click to the picture opens a card with a picture again... If I click
   it, the pictures twist, and I see the back. In the back, there is a caption." — so the PAINTING
   itself is the card. Front: the work. Back: the wall label. (A museum card is a WALL LABEL and
   its block of facts is the TOMBSTONE; the page uses those words, never "caption".)
   No zoom link on it any more — he does not want one, and an <a> around the image swallowed the
   click that was supposed to turn it.
   ponytail: no JS. A checkbox and a sibling selector do the whole thing, so it still turns with
   scripting off. The plate carries each painting's real aspect ratio, measured from the JPEG at
   build time, so a future non-square work cannot silently distort. */
/* The checkbox is plumbing, never furniture — hidden but still focusable for the keyboard. */
.flip-toggle{position:absolute;opacity:0;width:0;height:0;margin:0}
.plate{display:block;height:100%;max-width:100%;cursor:pointer;perspective:1800px;
  background:none;border:0;padding:0}
.plate .inner{display:block;position:relative;width:100%;height:100%;
  transition:transform .8s cubic-bezier(.4,.1,.2,1);transform-style:preserve-3d}
.flip-toggle:checked + .plate .inner{transform:rotateY(180deg)}
.flip-toggle:focus-visible + .plate .inner{outline:3px solid #c8102e;outline-offset:6px}
.plate .face{position:absolute;inset:0;backface-visibility:hidden;background:#ffffff;
  border:1px solid #d6d2c9;box-shadow:0 16px 44px rgba(40,34,20,.20)}
.plate .front img{width:100%;height:100%;display:block;object-fit:contain}
/* Two columns, like a real gallery label with a long text. One column at this size could not
   hold the longest essay (July4th2020, ~2,100 characters) without a scrollbar, and there are no
   scrollbars on this site. overflow:hidden is the belt: if a future text is longer than the plate,
   it clips rather than growing a scrollbar — build_site's check below fails loudly first. */
.plate .rear{transform:rotateY(180deg);overflow:hidden;padding:clamp(18px,2.2vh,38px);
  display:flex;flex-direction:column}
.plate .rear .text{flex:1;min-height:0;columns:2;column-gap:clamp(18px,2vw,34px);
  column-rule:1px solid #e6e2d9;font-size:clamp(10px,1.05vh,14px)}
.tomb-artist{font-size:12px;letter-spacing:.26em;text-transform:uppercase;color:#111111}
.tomb-title{margin:6px 0 0;font-size:clamp(17px,2.6vh,30px);letter-spacing:.04em;color:#111111;
  font-style:italic}
.tomb-line{margin:6px 0 clamp(10px,1.4vh,20px);font-size:clamp(11px,1.2vh,13px);color:#111111;
  padding-bottom:clamp(8px,1.2vh,16px);border-bottom:1px solid #d6d2c9;flex:none}
.plate .rear p{margin:0 0 .9em;color:#111111;text-transform:none;letter-spacing:normal;
  break-inside:avoid}
.plate .rear p:last-child{margin-bottom:0}
.pending{color:#c8102e;font-size:15px}
.turn-hint{margin:0;font-size:clamp(9px,1.05vh,11px);letter-spacing:.28em;
  text-transform:uppercase;color:#c8102e;flex:none;text-align:center}

.buy{display:inline-block;margin:0;padding:clamp(8px,1.2vh,14px) clamp(18px,2vw,30px);border:2px solid #111111;
  color:#111111;text-decoration:none;font-size:13px;letter-spacing:.16em;text-transform:uppercase;
  background:#ffffff}
.buy:hover{background:#111111;color:#ffffff}
.nextprev{width:100%;display:flex;justify-content:space-between;gap:20px;margin:0;flex:none;
  border-top:1px solid #d6d2c9;padding-top:clamp(8px,1.4vh,18px);font-size:clamp(10px,1.15vh,13px);
  letter-spacing:.12em;text-transform:uppercase}
.nextprev a{text-decoration:none}

/* ---- about + footer ------------------------------------------------------- */
.about{padding:clamp(20px,3vh,50px) 0;font-size:clamp(13px,1.5vh,16px);flex:1;min-height:0;
  overflow:hidden}
.about p{max-width:78ch}
footer .wrap{display:block;flex:none;min-height:auto}
footer{border-top:1px solid #d6d2c9;padding:clamp(10px,1.6vh,22px) 0;text-align:center;
  font-size:clamp(10px,1.2vh,13px);letter-spacing:.1em;color:#111111;flex:none}
