/* ---------- DAYLIGHT (Anthony, 2026-09-25) ----------
   An Easter-egg colour mode in Settings, on top of the light theme: a cream
   ground, charcoal ink in place of #111, the grey surfaces (the feed's grey
   cards, the checkout, the journal card) in a pale accent, the chips and
   buttons in warm tints of the ground. The values are set on <html> by
   window.adlDay (index.html) from the visitor's clock and blended between six
   times of day. APPROVED EXCEPTION to the ten-colour palette: the point of it
   is colour. Defaults below are the morning's, in case the script is late. */
html.theme-day,
html.theme-day[data-theme="dark"]{
  --bg:var(--day-bg);
  --surface:var(--day-surface);
  --btn:var(--day-btn);
  --btn-hover:var(--day-btn-2);
  --chip:var(--day-chip);
  --chip-hover:var(--day-chip-2);
  --seg-glide:var(--day-glide);
  --ink:var(--day-ink);
  --ink-on-light:var(--day-ink);
  --jr-frost:var(--day-jr-frost);          /* an open journal keeps its card's colour, frosted */
  --jr-send:var(--day-prim);
  --jr-send-hover:var(--day-prim-2);
  --jr-send-ink:var(--day-on-prim);
  --contact-pill:var(--day-prim);
  --contact-pill-hover:var(--day-prim-2);
  --contact-card:var(--day-prim);
  --contact-ink:var(--day-on-prim);
  --contact-field:var(--day-field);
  --contact-field-focus:var(--day-field-2);
  --contact-send:var(--day-send);
  --contact-send-hover:var(--day-send-2);
  --contact-send-ink:var(--day-send-ink);
}
html.theme-day .panel::before{background:var(--day-frost)}
/* the cards and the open journal carry their own ink, picked against their own colour */
html.theme-day .surface-card,
html.theme-day .jr-card{--ink:var(--day-surf-ink)}
/* the menu's pills and Settings card: a light wash of the accent, not white */
html.theme-day .pill,
html.theme-day .set-card{background-color:var(--day-pill)}
@media (hover:hover){html.theme-day .pill:hover,html.theme-day .set-card:not(.is-open):hover{background-color:var(--day-pill-2)}}html.theme-day .pill.is-pressed,html.theme-day .set-card:not(.is-open).is-pressed{background-color:var(--day-pill-2)}

/* THE TIME-OF-DAY SLIDER (his idea, 2026-09-25): while Daylight is on, a
   slider under the switches in the Settings card (first the footer on a laptop;
   he preferred the phone's place in the menu) scrubs the studio's day. The switch's own language:
   a 32 pill track in the day's chip, a 26 ink knob; the studio time beside it
   at 14. The pick lasts the visit; switching Daylight off and on goes back to
   the studio's real time. */
.day-dial{display:none;align-items:center;gap:10px;font-size:var(--fs-s);pointer-events:auto}
.day-dial input{
  -webkit-appearance:none;appearance:none;
  width:160px;height:var(--chip-h);margin:0;padding:0 3px;
  border-radius:999px;background-color:var(--chip);cursor:pointer;
}
.day-dial input::-webkit-slider-runnable-track{height:var(--chip-h);background:transparent;border:0}
.day-dial input::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;
  width:calc(var(--chip-h) - 6px);height:calc(var(--chip-h) - 6px);margin-top:3px;
  border:0;border-radius:50%;background-color:var(--ink);
}
.day-dial input::-moz-range-track{height:var(--chip-h);background:transparent;border:0}
.day-dial input::-moz-range-thumb{width:calc(var(--chip-h) - 6px);height:calc(var(--chip-h) - 6px);border:0;border-radius:50%;background-color:var(--ink)}
.day-time{min-width:64px;font-variant-numeric:tabular-nums}
.set-fold .day-dial{margin-top:10px}
html.theme-day .set-fold .day-dial{display:flex}
.set-fold .day-dial input{flex:1;width:auto}
/* The wordmark and footer drop their exclusion blend under Daylight: the grounds
   pass through mid-tones (the 20:30 lavender), where an exclusion of #eee lands
   near the ground itself and the chrome vanished. They take the ink instead,
   picked for contrast every minute. Over a photograph (a phone scrolling a
   card under the header) they are plain ink — the price of the mode. */
html.theme-day .blend-ink{color:var(--ink);mix-blend-mode:normal}


/* DAYLIGHT'S ARROWS (his report, 2026-09-25): the carousel arrows and the
   header's Back are a background IMAGE with the stroke baked in (#111, or the
   dark theme's white), so under Daylight they stayed black or white — at night,
   white — instead of the day's ink. Here the file is a MASK on ::before, filled
   with --ink, so the arrow takes the colour of the minute like every other
   glyph. ::after is the phone's tap area, so ::before it is. */
html.theme-day .arrow{background-image:none;position:relative}
html.theme-day .arrow::before{
  content:"";
  position:absolute;
  left:50%;top:50%;
  width:12px;height:12px;
  margin:-6px 0 0 -7px;   /* optical, as .arrow */
  background-color:var(--ink);
  -webkit-mask:url("/assets/svg/arrow.svg") center / 12px 12px no-repeat;
  mask:url("/assets/svg/arrow.svg") center / 12px 12px no-repeat;
  pointer-events:none;
}

/* THE STUDIO'S TIME ON HOVER (Anthony, 2026-09-25). "Open for projects" gives
   way to the studio's clock, "3:42 PM ET" — when the studio is awake, without
   naming a place (remote, on purpose). The two lines are laid on one grid cell
   so the footer never changes width. The swap is a COLOUR crossfade, not
   opacity or a transform: each word is exclusion-blended on its own layer, and
   Safari blends an opacity-faded or transformed element against nothing (see
   the wordmark's rule). No hover on a phone: it keeps the words. */
/* NO HOVER ON THE STATUS (2026-11-14, his call: the time that faded in after the
   dot is gone). "Open for projects" and its dot simply stay as they are. */
.footer .studio-clock{cursor:default;user-select:none;-webkit-user-select:none}   /* a status, not text to select: the normal arrow, no I-beam (his note, 2026-09-26) */

/* ---------- THE SHAPE SYSTEM (2026-10-28, his rule, replacing "everything is a pill") ----------
   A shape says what a thing is, not just that it can be pressed:
   - PILL: what slides or floats — the pair switches (Feed · Index, Overview ·
     Process, Privacy · Terms, the settings switches), the cursor's bubble, the
     header's chips (the project index, search, the hover tag beside it).
   - CIRCLE: an icon alone — the plus that turns into an X, the arrows, Back,
     share. Buy stays a PILL: it sits beside a circle (the X, share), and a box
     there fought it (his call, 2026-10-28).
   - BOX (--box-r, 5): a word you act on, or a field you type in, standing on a
     text edge inside a card or a panel — Read more, Start a project, the
     menu's rows and Get in touch, every field and Send, the checkout. Square
     at the edge it shares with the text; 5 nests inside the cards' 10.
   Listed here, last and under :root, so it outranks each control's own corner
   on both a laptop and a phone (where many were 20, half of 40). */
:root .btn,
:root .surface-card .btn,
:root .synopsis .btn,
:root .panel .contact,
:root .panel .pill,
:root .set-card,
:root .send,
:root .head-contact .send,
:root .field input,
:root .field select,
:root .field textarea,
:root .brief-field textarea,
:root .brief-send,
:root .co-x,
:root .co-pay,
:root .co-bycard,
:root .co-field input,
:root .co-field select,
:root .co-cardrow,
:root .co-field .co-cardrow input:last-child{border-radius:var(--box-r)}


/* a picture's veil while it fades in over its skeleton (strip/build.js, "THE REST OF THE
   PICTURES ARRIVE THE SAME WAY"); the parents are positioned so it lands on it */
.shots,
.shot-link{position:relative}
.img-veil{position:absolute;border-radius:var(--radius);pointer-events:none}

/* the picture carried into the project page: sized as it lands and scaled back to
   start, so it stays sharp and moves on the compositor. At the strip's size the
   page's 10 corner scales to about the strip's 4, so the corner needs no animating. */
.wl-fly{position:fixed;z-index:30;transform-origin:0 0;border-radius:var(--radius);overflow:hidden;pointer-events:none;will-change:transform}
.wl-fly > *{display:block;width:100%;height:100%;object-fit:cover}

/* THE FLOATING INDEX (2026-11-04). The preview holding all of the project's pictures,
   none cropped: each is its own shape inside 300 × 250, centred on the pointer's level.
   Each slide's clip-path (wlDeckPaint) is its share of the window. */
@media (min-width:769px){.wl-row{cursor:default}}
.wl-media{width:300px;border-radius:0;overflow:visible}
.wl-media > .wl-deck{background:none;border-radius:0;overflow:visible}
.wl-deck-rail{display:flex;align-items:center;gap:4px;height:100%;will-change:transform}
.wl-slide{position:relative;flex:none;overflow:hidden;border-radius:10px;background:var(--surface)}
.wl-slide > *{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity 280ms var(--ease);-webkit-user-drag:none}
.wl-slide > .is-in{opacity:1}

/* A phone leaving the list for a project (wlLeave in app.js): the list holds its place out
   of the flow while .wl-doc runs its usual fade out, and the feed stays gone. */
@media (max-width:768px){
  body.wl-leaving .stage{display:none !important;transition:none !important}
  body.wl-leaving .worklist{display:block;visibility:visible;position:fixed;left:0;right:0;bottom:auto;pointer-events:none}
}

/* The Start panel's message field gives up what a short phone is missing, so Send and the
   studio's email fit without a scroll (an iPhone 12 mini with its bars showing: 76, from 100).
   It grows as it is typed in, as it always has. */
@media (max-width:768px){
  .jr-card .field textarea{height:clamp(76px, calc(100svh - 553px), 100px)}
}

/* A phone closing an entry (see "ON A PHONE THE WINDOW CLOSES BY CLIP" in app.js). The card's own
   frost goes first: the scrim behind it is already blurring the same feed, so two blurs were being
   redrawn on every frame for one look. It settles on the feed card's surface, which it lands on. */
@media (max-width:768px){
  /* and it starts softer and runs a little longer than the laptop's. On --glide a close this
     tall travelled 70% of the way in its first 100ms, which is where a phone's slowest frames
     are. The headline flies on the same curve, so it stays inside the closing card. */
  :root{--jr-close:520ms;--jr-shut:cubic-bezier(.25,.75,.2,1)}
  .jr-fly{transition-timing-function:var(--jr-shut)}
  body.journal-open .jr-fly{transition-timing-function:var(--glide)}
  body.jr-closing .jr-card::before{
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    background:var(--surface);
    transition:background var(--jr-close) var(--ease);
  }
}

/* THE PAGE AS PLAIN HTML (2026-10-25): what the server writes for readers that
   do not run scripts (app/[[...slug]]/page.tsx). Hidden as soon as the boot
   script can run, which is everyone else; app.js draws the same content. */
html.js #ssr{display:none}
/* without scripts the app's shell stays empty: the plain page sits over it */
html:not(.js) #ssr{position:fixed;inset:0;z-index:2147483647;overflow:auto;background:var(--bg);color:var(--ink)}
#ssr{padding:40px max(20px, calc((100vw - 720px) / 2));font-size:16px;line-height:1.5}
#ssr a{color:inherit}
#ssr p,#ssr ul{margin:0 0 14px}#ssr h1{margin:20px 0}#ssr h2{margin:30px 0 10px}
#ssr img{display:block;width:100%;height:auto;margin:20px 0}
