/* OIYI depth layer (2026-11-03, after the critique round). Paper on paper: a surface is a second sheet laid on the
   ground, told by a hairline edge and a one-pixel shade along its bottom (its thickness). Nothing blurs, nothing glows.
   Lift = the sheet rises two pixels (240 ms in, 160 ms back, the house curve) and shows more thickness. Pressed = a
   solid button loses its thickness and takes a shade along its top (no movement: the hit area never shifts). Fields
   sit pressed into the paper. One grain over everything (the pages carry it; this file adds it only where a page has
   none). Linked by every page after oiyi-fonts.css; the tokens below are the whole vocabulary. */
:root{
  --depth-edge:rgba(34,35,34,0.10);
  --depth-edge-up:rgba(34,35,34,0.22);
  --depth-light:rgba(255,255,255,0.72);
  --depth-shade:rgba(34,35,34,0.09);
  --depth-shade-up:rgba(34,35,34,0.16);
  --depth-ease:cubic-bezier(0.16,1,0.3,1);
  --depth-in:240ms;
  --depth-out:160ms;
  --depth-press:80ms;
}

/* ---- a picture is a print laid on the paper: an inner edge over the image, thickness under it ---- */
[data-storegrid] a > span:first-child,
figure.media,
a.card .ph{position:relative;box-shadow:0 1px 0 var(--depth-shade);transition:transform var(--depth-out) var(--depth-ease),box-shadow var(--depth-out) var(--depth-ease);}
[data-storegrid] a > span:first-child::after,
figure.media::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 1px var(--depth-edge);transition:box-shadow var(--depth-out) var(--depth-ease);}
[data-storegrid] a:focus-visible > span:first-child,
a.card:focus-visible .ph{transform:translateY(-2px);box-shadow:0 2px 0 var(--depth-shade-up);transition-duration:var(--depth-in);}
[data-storegrid] a:focus-visible > span:first-child::after{box-shadow:inset 0 0 0 1px var(--depth-edge-up);transition-duration:var(--depth-in);}
@media (hover:hover){
  [data-storegrid] a:hover > span:first-child,
  a.card:hover .ph{transform:translateY(-2px);box-shadow:0 2px 0 var(--depth-shade-up);transition-duration:var(--depth-in);}
  [data-storegrid] a:hover > span:first-child::after{box-shadow:inset 0 0 0 1px var(--depth-edge-up);transition-duration:var(--depth-in);}
}
[data-storegrid] a:active > span:first-child,
a.card:active .ph{transform:translateY(0);box-shadow:0 1px 0 var(--depth-shade);transition-duration:var(--depth-press);}

/* ---- a panel is a sheet: the order summary, the letters states (the light reads on toned panels, not on the paper) ---- */
.os,.legal .state,.legal .unsub{box-shadow:0 0 0 1px var(--depth-edge),inset 0 1px 0 var(--depth-light),inset 0 -1px 0 var(--depth-shade);}

/* ---- the phone menu is a sheet rising over the page: the one surface that overlaps content gets the firmest edge ---- */
#oiyi-menu:not([hidden]){box-shadow:0 -1px 0 var(--depth-edge-up),0 -2px 0 var(--depth-shade);}

/* ---- buttons: thickness under them; pressed, the thickness goes and a shade falls along the top ---- */
.buy,button.buy,a.buy{box-shadow:0 1px 0 var(--depth-shade-up);transition:box-shadow var(--depth-out) var(--depth-ease),background-color var(--depth-out),color var(--depth-out),border-color var(--depth-out);}
.buy:active,button.buy:active,a.buy:active{box-shadow:0 0 0 var(--depth-shade-up),inset 0 1px 0 rgba(0,0,0,0.18);transition-duration:var(--depth-press);}
.buy:disabled,button.buy:disabled{box-shadow:none;}

/* ---- fields sit pressed into the paper (the pages keep their own focus rings) ---- */
input[type="email"],input[type="text"],input[type="number"],input[type="date"],input[type="url"],input[type="password"],input[type="search"],input[type="tel"],textarea,select{box-shadow:inset 0 2px 0 rgba(34,35,34,0.07);}

/* ---- the grain, for a page that carries none of its own (admin, Track ID) ---- */
body[data-grain]::after{content:"";position:fixed;inset:0;z-index:80;pointer-events:none;background:url("assets/texture-paper.webp") center/cover;mix-blend-mode:multiply;opacity:0.05;}
@media (prefers-contrast:more),(forced-colors:active){body[data-grain]::after{display:none;}}

@media (prefers-reduced-motion:reduce){
  [data-storegrid] a > span:first-child,[data-storegrid] a > span:first-child::after,figure.media,figure.media::after,a.card .ph,.buy,button.buy,a.buy{transition:none;}
  [data-storegrid] a:hover > span:first-child,[data-storegrid] a:focus-visible > span:first-child,a.card:hover .ph,a.card:focus-visible .ph{transform:none;}
}
