/* The projector switch and the dark screen (dark.js). The dark covers the whole window, header and all; the switch
   stays above it. */
/* the switch: an old-school wall light switch (Toby, 2026-11-24: "like an actual physical switch... like an old school
   light switch, on the right side"). An ivory plate with two slotted screws, a dark slot, and a toggle lever that points
   up for on and down for off. In the bottom right corner of the window (moved there 2026-11-24, his ask), with a sticky
   note beside it that says Projector. */
.pswitch{z-index:300; right:18px; bottom:14px; width:48px; height:80px; padding:0; border:0; cursor:pointer; border-radius:7px;
  background:linear-gradient(160deg, #f6efdd 0%, #e9dfc6 60%, #d9cdb0 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.5), inset 0 -2px 3px rgba(80,60,30,.18), 2px 3px 0 rgba(20,14,10,.35), 0 6px 14px rgba(0,0,0,.25)}
/* the screws, top and bottom, each with its slot at its own angle */
.pswitch::before, .pswitch::after{content:''; position:absolute; left:50%; width:8px; height:8px; margin-left:-4px; border-radius:50%;
  background:radial-gradient(circle at 35% 35%, #f3ead4, #b9ab8c 70%); box-shadow:inset 0 0 0 1px rgba(90,70,40,.35)}
.pswitch::before{top:6px} .pswitch::after{bottom:6px}
.pswitch .scr{position:absolute; left:50%; width:6px; height:1.5px; margin-left:-3px; background:rgba(70,55,35,.7); border-radius:1px; pointer-events:none}
.pswitch .scr.a{top:9.3px; transform:rotate(-28deg)} .pswitch .scr.b{bottom:9.2px; transform:rotate(52deg)}
/* the slot and the lever in it */
.pswitch .slot{position:absolute; left:50%; top:50%; width:12px; height:28px; margin:-14px 0 0 -6px; border-radius:3px; background:#2a231d;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.6)}
.pswitch .lever{position:absolute; left:50%; top:50%; width:10px; height:17px; margin-left:-5px; border-radius:4px 4px 3px 3px;
  background:linear-gradient(180deg, #fbf6e8 0%, #e6dbc0 70%, #cbbd9c 100%); box-shadow:0 2px 2px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.7);
  transform:translateY(-100%); transition:transform .12s cubic-bezier(.3,1.4,.5,1)}
.pswitch[aria-pressed="false"] .lever{transform:translateY(0) scaleY(-1);
  background:linear-gradient(180deg, #fbf6e8 0%, #e6dbc0 70%, #cbbd9c 100%); box-shadow:0 -2px 2px rgba(0,0,0,.35)}
/* ON / OFF, stamped faintly on the plate */
.pswitch .lb{position:absolute; left:0; right:0; text-align:center; font:700 6.5px/1 var(--mono); letter-spacing:.1em; color:rgba(70,55,35,.5); pointer-events:none}
.pswitch .lb.on{top:17px} .pswitch .lb.off{bottom:17px}
.pswitch:focus-visible{outline:2px solid var(--amber); outline-offset:3px}
/* the sticky note, stuck on the wall a little crooked, the word in marker, its right edge tucked under the switch plate
   (Toby, 2026-11-24: fit the word in the sticky; the switch overlaps it a little). Its own piece, just under the switch */
.pnote{z-index:299; right:58px; bottom:22px; width:88px; height:66px; display:grid; place-items:center; transform:rotate(-5deg); pointer-events:none;
  background:linear-gradient(175deg, #f7e27a 0%, #f1d65e 78%, #e6c84f 100%); box-shadow:1px 2px 0 rgba(120,90,20,.25), 2px 5px 8px rgba(0,0,0,.22);
  font:700 19px/1 Caveat, 'Segoe Print', cursive; color:#2a211e; letter-spacing:0; padding:0 10px 0 6px; box-sizing:border-box; transition:opacity .4s}
.pnote::before{content:''; position:absolute; left:0; right:0; top:0; height:12px; background:rgba(255,255,255,.18)}   /* the sticky strip along its top */
.pswitch{transition:opacity .4s}

/* the dark: quick (his ask: near instant, but not quite), then the form and the loop come up out of it */
/* the loop on top, lying flat, and the form under it (Toby, 2026-11-24); it scrolls if the window is short */
.pdark{z-index:250; inset:0; background:#0b0807; opacity:0; visibility:hidden; transition:opacity .22s ease, visibility 0s linear .22s;
  display:grid; grid-template-columns:minmax(0, 1fr); justify-items:center; align-content:start; gap:10px; padding:2vh 6% 48px; box-sizing:border-box; overflow-y:auto}
.proj-off .pdark{opacity:1; visibility:visible; transition:opacity .22s ease-out}
.pdark > *{opacity:0; transform:translateY(8px); transition:opacity .2s ease, transform .2s ease}
.proj-off .pdark > *{opacity:1; transform:none; transition:opacity .7s ease .3s, transform .7s ease .3s}

/* the form: two columns on a wide window (name and email, phone and how you found me), the message and the rest across
   both; one column on a phone */
.pform{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px 20px; max-width:760px; width:100%; color:var(--cream)}
.pform h2, .pform .pwide, .pform .pturn, .pform .prow{grid-column:1 / -1}
.pdark .pform h2{margin:0 0 6px; font:400 clamp(30px, 3.4cqw, 54px)/1 var(--display); letter-spacing:0; text-transform:none; color:var(--amber); text-shadow:2px 2px 0 var(--maroon)}
.pform label{display:grid; gap:6px; font:700 10.5px/1 var(--mono); letter-spacing:.16em; text-transform:uppercase; color:rgba(242,229,199,.62)}
.pform input, .pform textarea, .pform select{font:400 16px/1.4 var(--sans); color:var(--cream); background:rgba(242,229,199,.05); border:1.5px solid rgba(242,229,199,.25);
  border-radius:8px; padding:10px 12px; letter-spacing:0; text-transform:none; resize:vertical}
.pform select{appearance:none; cursor:pointer; padding-right:34px;
  background-image:linear-gradient(45deg, transparent 50%, rgba(242,229,199,.7) 50%), linear-gradient(135deg, rgba(242,229,199,.7) 50%, transparent 50%);
  background-position:calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size:6px 6px; background-repeat:no-repeat}
.pform select option{color:var(--ink); background:var(--cream)}
.pform [hidden]{display:none}
.pform input:focus, .pform textarea:focus, .pform select:focus{outline:none; border-color:var(--amber); background:rgba(242,229,199,.08)}
.pturn:empty{display:none}
.prow{display:flex; align-items:center; gap:14px; flex-wrap:wrap}
.psend{font:700 11px/1 var(--mono); letter-spacing:.16em; text-transform:uppercase; color:var(--ink); background:var(--amber); border:0; border-radius:999px; padding:12px 22px; cursor:pointer; box-shadow:3px 3px 0 var(--maroon)}
.psend:focus-visible{outline:2px solid var(--cream); outline-offset:3px}
.pmsg{font:400 14px/1.4 var(--sans); color:rgba(242,229,199,.75)}

/* the loop: cream digits, amber where the pointer is. Lying flat over the form, as wide as the form at most */
.ploop{order:-1; width:min(620px, 100%); display:flex; justify-content:center}
.ploop svg{width:100%; height:auto; max-height:28vh; overflow:visible; fill:rgba(242,229,199,.82); font:700 1px var(--mono); cursor:pointer; touch-action:none; user-select:none}
.ploop svg text{transition:fill .3s}
.ploop svg text.lit{fill:var(--amber)}

/* a phone: one column */
@container (max-width: 700px){ .pform{grid-template-columns:minmax(0, 1fr)} .pdark{padding:16px 6% 48px} }
@media (max-width: 700px){ .pform{grid-template-columns:minmax(0, 1fr)} .pdark{padding:16px 6% 48px} }
