/* Polish layer (2026-10-31). CSS only, loads last on every page that loads styles.css. Remove the <link> to roll back.
   It changes no copy, layout or color. It only pins how things move and how focus looks.

   Spec (WEB_DESIGN_REFERENCE.md section 6, motion part; type, palette and spacing stay as glass.css sets them)
   MOTION   easing: cubic-bezier(.2,.7,.2,1), the curve cinematic.css and glass.css already use (--ease-cine, --ease-glass)
            durations: 120ms (press, color, opacity, page fade out) and 320ms (transform release, panels, page fade in;
            320ms also matches the panel close timer in app.js)
            distances: reveal 20px up (the existing reveal distance), hover lift unchanged, press scale .98
            properties: transform, translate and opacity only. Box shadows change instantly, they never animate.
            reduced motion: everything here is off (styles.css already stops transitions and animations; this file also
            turns off the page crossfade, which the * rule cannot reach)
   SCROLL   no smooth scroll library, no pinned sections. Reveals are scroll-linked (animation-timeline: view()) where the
            browser supports it, so they run off the main thread; elsewhere app.js keeps its IntersectionObserver reveal.
            Content is visible by default: nothing here hides anything when the feature is missing.
   PAGES    same-origin page loads crossfade (120ms out, 320ms in) through @view-transition.
   Chosen of three: (A) scroll-linked translate reveals that replace the JS reveal where supported, (B) keep the JS reveal and add
   view() reveals only to elements it misses, (C) interaction polish only, no scroll motion. A won: one reveal system per browser,
   compositor-run, correct after anchor jumps and fast scrolls; B double-animates the same boxes, C leaves the JS cost in place.
   PW-020 still holds: reveals never animate opacity, so text contrast stays at AA while it moves. */

:root{--pl-ease:cubic-bezier(.2,.7,.2,1);--pl-fast:120ms;--pl-slow:320ms}

/* 1. Transitions: one curve, two durations, no box-shadow in the list. */
.btn,.chip,.send,.icon-btn,.menu-btn,.nav-links a,.mnav a,.project-switcher button,.ti-jump a,.go-link,.ask-about,.motion-toggle,.lb-btn,.hero-text-link,
:is(.wc-opt,.bd-opt,.ts-opt,.os-opt,.cc-opt,.ct-opt,.pl-opt),.door,.build,.entry,.card,.door-mini{
  transition:color var(--pl-fast) var(--pl-ease),background-color var(--pl-fast) var(--pl-ease),border-color var(--pl-fast) var(--pl-ease),opacity var(--pl-fast) var(--pl-ease),transform var(--pl-slow) var(--pl-ease)}
.door-img img,.entry-img img,.door-body h3 .arrow,.next-page a i{transition:transform var(--pl-slow) var(--pl-ease)}
.chat,.mnav{transition:transform var(--pl-slow) var(--pl-ease),opacity var(--pl-fast) var(--pl-ease)}

/* 2. Press: feedback on the way down, at one scale. */
:is(.btn,.chip,.send,.icon-btn,.menu-btn,.nav-links a,.project-switcher button,.ti-jump a,.go-link,.ask-about,.motion-toggle,.lb-btn,.hero-text-link,.wc-opt,.bd-opt,.ts-opt,.os-opt,.cc-opt,.ct-opt,.pl-opt):active,
:is(a.door,a.card,a.entry,a.door-mini):active{transform:scale(.98);transition-duration:var(--pl-fast)}

/* 3. Hover lift only for a mouse or trackpad. Touch screens and coarse pointers keep a still card after a tap. */
@media not ((hover:hover) and (pointer:fine)){
  .btn:hover,.door:hover,.build:hover,.entry:hover,.card:hover,.door-mini:hover,.door:hover .door-img img,.door:hover .arrow,.next-page a:hover i{transform:none}
}

/* 4. Focus: one ring, 2px --fairway #0b7a75 at 5.2:1 on white and 4.75:1 on the paper; cyan #34e0d6 only in the dark home hero (WCAG 1.4.11 needs 3:1). Fields used a 35% halo
   (about 1.6:1) and an outline:none set in some page styles, so text fields, selects and the wrapped tool inputs get the
   same ring; the !important is what lets it beat those per-page outline:none rules. Range sliders keep their thumb ring,
   checkboxes and radios keep their option ring. Inside the project demo frame, focus lands on the demo's own controls, which ring there. */
:is(input:not([type=range],[type=checkbox],[type=radio]),select,textarea):not(.t-input *):focus-visible{outline:2px solid var(--fairway)!important;outline-offset:2px}
[aria-invalid=true]:is(input,select,textarea):focus-visible{outline-color:var(--neg,#c0392b)!important}
.t-input:focus-within{outline:2px solid var(--fairway);outline-offset:2px}

/* 5. Scroll-linked reveals. Only with support, only on screen, only without reduced motion. */
@keyframes pl-rise{from{translate:0 20px}}
@media screen and (prefers-reduced-motion:no-preference){
  @supports (animation-timeline:view()) and (translate:0 1px){
    .reveal.pending{transform:none}
    body:not(.motion-paused) :is(.door,.entry,.build,.sec-head,.cta,.edu-grid,.proof){animation:pl-rise linear backwards;animation-timeline:view();animation-range:entry 0% entry 60%}
  }
}

/* 6. Page loads: a short crossfade, opacity only. */
@keyframes pl-out{to{opacity:0}}
@keyframes pl-in{from{opacity:0}}
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:pl-out var(--pl-fast) var(--pl-ease) both}
  ::view-transition-new(root){animation:pl-in var(--pl-slow) var(--pl-ease) both}
}

/* 7. Reduced motion: no crossfade, no press scale (styles.css and glass.css already stop the rest). */
@media (prefers-reduced-motion:reduce){
  @view-transition{navigation:none}
  :is(.btn,.chip,.send,.icon-btn,.menu-btn,.nav-links a,.project-switcher button,.ti-jump a,.go-link,.ask-about,.motion-toggle,.lb-btn,.hero-text-link,.wc-opt,.bd-opt,.ts-opt,.os-opt,.cc-opt,.ct-opt,.pl-opt):active,
  :is(a.door,a.card,a.entry,a.door-mini):active{transform:none}
}

/* mobile pass (Nov 2026): Matcha Mucho benchmark. Footer links back to 44px targets on phones */
@media (max-width:900px){
  footer nav a{min-height:44px}
}


/* PW-411: start-here cards on /recruiters show the same arrow cue as the home door cards. */
.start-here .t-card h3 .arrow{color:var(--fairway);font-family:var(--font-sans);font-weight:500;transition:transform var(--pl-slow) var(--pl-ease)}
.start-here .t-card:hover h3 .arrow{transform:translateX(4px)}
@media not ((hover:hover) and (pointer:fine)){.start-here .t-card:hover h3 .arrow{transform:none}}
@media (prefers-reduced-motion:reduce){.start-here .t-card h3 .arrow{transition:none}.start-here .t-card:hover h3 .arrow{transform:none}}
