/* Overhead projector look, tokens + component CSS. Draft 0.1, 2026-11-23.
   Every number here has a reason in style.md. Change it here first. */
.oh {
  /* ---- light */
  --oh-room: #0d0907;            /* dark classroom around the screen */
  --oh-lit: #f6edc9;             /* clean glass under the lamp: warm, never white */
  --oh-lit-hot: #fff8dc;         /* center of the lamp */
  --oh-edge: #3a2a14;            /* falloff color at the corners */
  --oh-hot: .6;                  /* hotspot strength 0..1 */
  --oh-grain: .5;                /* paper/glass grain 0..1 */
  --oh-key: 1.2deg;              /* keystone tilt of the screen */
  /* ---- sheets */
  --oh-tint-clear: rgba(110,90,40,.09);   /* clear plastic still dims the lamp a little */
  --oh-tint-yellow: rgba(236,205,70,.30);
  --oh-tint-blue: rgba(90,140,200,.22);
  --oh-tint-rose: rgba(210,100,110,.20);
  --oh-sheet-edge: rgba(80,60,20,.35);
  position: relative; width: 100%; max-width: 960px; margin: 0 auto;
  color-scheme: dark;
}
.oh-room { background: var(--oh-room); padding: 5% 6%; border-radius: 6px; perspective: 1500px; overflow: hidden; }
.oh-field {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 9% / 12%;
  background: var(--oh-lit);
  transform: rotateX(var(--oh-key)) rotateY(calc(var(--oh-key) * -.6));
  box-shadow: 0 0 60px 8px rgba(255,214,120,.18);
}
.oh-sheets { position: absolute; inset: 0; }
/* a transparency: a SQUARE of clear plastic, side = 120% of the screen width, so it is 160% of the screen height.
   The screen is a window onto it. */
.oh-sheet {
  position: absolute; left: -10%; top: -30%; width: 120%; height: 160%; transform: var(--pos);
  transition: transform 1.1s cubic-bezier(.15,.7,.25,1), filter 1.1s cubic-bezier(.45,.1,.6,1), opacity .9s ease;
  background: var(--oh-tint-clear); mix-blend-mode: multiply;
  outline: 1.5px solid var(--oh-sheet-edge); box-shadow: 0 2px 6px rgba(60,40,10,.25);
}
.oh-sheet.is-base { outline: none; box-shadow: none; }
/* the svg (pen coordinates 1000x750) covers exactly the visible window, centered on the square */
.oh-sheet svg { position: absolute; left: 8.3333%; top: 18.75%; width: 83.3333%; height: 62.5%; display: block; overflow: visible; }
.oh-sheet[data-tint=yellow] { background: var(--oh-tint-yellow); }
.oh-sheet[data-tint=blue] { background: var(--oh-tint-blue); }
.oh-sheet[data-tint=rose] { background: var(--oh-tint-rose); }
.oh-sheet.is-arriving { transform: var(--from); filter: blur(22px); opacity: .7; }
.oh-sheet.is-driven { transition: none !important; will-change: transform; }
.oh-sheet.is-nudging { transition: transform .6s cubic-bezier(.2,.55,.3,1), filter 1.1s cubic-bezier(.45,.1,.6,1), opacity .9s ease; }
.oh-sheet.is-fixing { transition: transform .4s cubic-bezier(.25,.5,.3,1), filter 1.1s cubic-bezier(.45,.1,.6,1) !important; }
.oh-sheet.is-leaving  { transition-duration: .9s; transform: var(--to); filter: blur(22px); opacity: .6; }
/* ink multiplies, so crossing strokes and stacked sheets darken, the way light does */
.oh-ink { mix-blend-mode: multiply; }
.oh-hi { mix-blend-mode: multiply; }
.oh-text { font-weight: 600; letter-spacing: .2px; }
/* the lamp: bright middle, brown corners, a faint lens ring, drifting color at one edge */
.oh-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 52% 48% at 47% 44%, rgba(255,250,215,calc(var(--oh-hot) * .55)), transparent 70%),
    radial-gradient(ellipse 85% 82% at 50% 50%, transparent 52%, rgba(58,42,20,.62) 100%),
    linear-gradient(100deg, rgba(120,160,210,.10), transparent 22%);
  mix-blend-mode: normal;
}
.oh-ring {
  position: absolute; inset: 0; pointer-events: none; opacity: .09;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 22px, rgba(255,255,255,.9) 22px 24px);
  mask-image: radial-gradient(circle at 50% 50%, transparent 25%, #000 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 25%, #000 70%);
}
.oh-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: calc(var(--oh-grain) * .28); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .22  0 0 0 0 .1  0 0 0 1.1 -.35'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
}
/* the pen tip and the hand shadow it brings with it */
.oh-pen {
  position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; pointer-events: none;
}
.oh-pen::after {
  content: ""; position: absolute; left: 0; top: 0; width: calc(150px * var(--u, 1)); height: calc(9px * var(--u, 1)); transform-origin: 0 50%;
  transform: rotate(58deg) translateY(-50%);
  background: linear-gradient(90deg, rgba(20,12,6,.9), rgba(20,12,6,.55));
  filter: blur(1.2px); border-radius: 0 6px 6px 0; margin-left: 2px;
}
.oh-hand { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; opacity: 0; pointer-events: none; }
.oh-hand svg { filter: blur(11px); }
@media (prefers-reduced-motion: reduce) { .oh-sheet { transition: none; } }
