/* KARZ Studio interaction set, wave 02. Numbers 01–20 continue in ux-studio.js. */
@media (prefers-reduced-motion:no-preference) {
  /* 01 — The chrome mark's name gets a paired registration bracket. */
  html:not(.reduced-motion) .centered-name {
    background-image:linear-gradient(#ffc1ad,#ffc1ad),linear-gradient(#ffc1ad,#ffc1ad);
    background-position:0 70%,100% 70%;background-repeat:no-repeat;
    background-size:1px 0,1px 0;transition:background-size .22s ease,color .2s ease;
  }
  html:not(.reduced-motion) .centered-name:is(:hover,:focus-visible){background-size:1px 11px,1px 11px}
  /* 02 — A hairline seats the glass edge as the sticky header settles. */
  html:not(.reduced-motion) .site-header-split::after {
    content:"";position:absolute;inset:auto 12% 0;height:1px;pointer-events:none;
    background:linear-gradient(90deg,transparent,#ffd1c04d,transparent);
    opacity:0;scale:.75 1;transition:opacity .26s ease,scale .34s ease;
  }
  html:not(.reduced-motion) .site-header-split.is-page-shifted::after{opacity:1;scale:1}
  /* 03 — Menu trigger folds its two lines together on press. */
  html:not(.reduced-motion) .site-header .menu-toggle:active .menu-icon i:first-child{transform:translateY(2px)}
  html:not(.reduced-motion) .site-header .menu-toggle:active .menu-icon i:last-child{transform:translateY(-2px)}
  /* 04 — The hero diagonal arrow moves with the link, not its hitbox. */
  html:not(.reduced-motion) .hero-work-link svg{transition:translate .27s cubic-bezier(.2,.7,.25,1)}
  html:not(.reduced-motion) .hero-work-link:is(:hover,:focus-visible) svg{translate:3px 3px}
  /* 05 — Intro byline catches a narrow strip of light, not a text shadow. */
  html:not(.reduced-motion) .intro-aside p strong:first-child {
    background:linear-gradient(90deg,#dc567350,#ffaf952b) left 93%/0 .32em no-repeat;
    transition:background-size .3s ease;
  }
  html:not(.reduced-motion) .intro-aside:is(:hover,:focus-within) p strong:first-child{background-size:100% .32em}
  /* 06 — Service link folds its corner in on deliberate press. */
  html:not(.reduced-motion) .journey-link span{display:inline-block;transition:rotate .21s ease}
  html:not(.reduced-motion) .journey-link:active span{rotate:22deg}
  /* 07 — Print registration corners frame featured art at keyboard focus or hover. */
  html:not(.reduced-motion) .featured-work .project-image::before {
    content:"";position:absolute;inset:10px;z-index:1;pointer-events:none;
    background:linear-gradient(#ffe6d9,#ffe6d9) left top/24px 1px,linear-gradient(#ffe6d9,#ffe6d9) left top/1px 24px,
               linear-gradient(#ffe6d9,#ffe6d9) right bottom/24px 1px,linear-gradient(#ffe6d9,#ffe6d9) right bottom/1px 24px;
    background-repeat:no-repeat;opacity:0;scale:.94;transition:opacity .28s ease,scale .32s ease;
  }
  html:not(.reduced-motion) .featured-work .project-card:is(:hover,:focus-within) .project-image::before{opacity:1;scale:1}
  /* 08 — The case-study label gains a soft matte highlight, separate from the 3D preview. */
  html:not(.reduced-motion) .case-kicker{transition:color .23s ease,letter-spacing .25s ease}
  html:not(.reduced-motion) .web-case:focus-within .case-kicker{color:#ffddd1;letter-spacing:.12em}
  /* 09 — The definition rail advances as a case-study link receives focus. */
  html:not(.reduced-motion) .case-body dl {
    background:linear-gradient(#ef9c8a70,#ef9c8a70) left top/1px 0 no-repeat;
    transition:background-size .35s ease;
  }
  html:not(.reduced-motion) .case-body:is(:hover,:focus-within) dl{background-size:1px 100%}
  /* 10 — Values rise optically under a short highlight wash. */
  html:not(.reduced-motion) .value h3{transition:color .25s ease,translate .25s ease}
  html:not(.reduced-motion) .value:hover h3{color:#ffd1be;translate:0 -3px}
  /* 11 — Archive next/previous cells give a physical press inset. */
  html:not(.reduced-motion) .archive-navigation :is([data-carousel-prev],[data-carousel-next]){transition:box-shadow .18s ease}
  html:not(.reduced-motion) .archive-navigation :is([data-carousel-prev],[data-carousel-next]):active{box-shadow:inset 0 0 0 2px #ff8fa5}
  /* 12 — Map mode's close cross swivels only on focus or hover. */
  html:not(.reduced-motion) [data-close-gallery] span{display:inline-block;transition:rotate .22s ease}
  html:not(.reduced-motion) [data-close-gallery]:is(:hover,:focus-visible) span{rotate:-18deg}
  /* 13 — Map keyboard focus gains viewport corner marks; existing focus ring stays. */
  html:not(.reduced-motion) .gallery-world::after{
    content:"";position:absolute;inset:12px;z-index:2;pointer-events:none;
    background:linear-gradient(#ffd4dd,#ffd4dd) left top/16px 1px,linear-gradient(#ffd4dd,#ffd4dd) right top/16px 1px,
               linear-gradient(#ffd4dd,#ffd4dd) left bottom/16px 1px,linear-gradient(#ffd4dd,#ffd4dd) right bottom/16px 1px;
    background-repeat:no-repeat;opacity:0;scale:.98;transition:opacity .2s ease,scale .2s ease;
  }
  html:not(.reduced-motion) .gallery-world:focus-visible::after{opacity:1;scale:1}
  /* 14 — On opening a VHS cover the view button's arrow gives a tiny diagonal turn. */
  html:not(.reduced-motion) [data-shelf-preview] span{display:inline-block;transition:rotate .25s ease}
  html:not(.reduced-motion) [data-shelf-preview]:is(:hover,:focus-visible) span{rotate:24deg}
  /* 15 — The arcade arrows momentarily deepen, independent of cartridge movement. */
  html:not(.reduced-motion) .arcade-arrow{transition:scale .15s ease}
  html:not(.reduced-motion) .arcade-arrow:active{scale:.91}
  /* 16 — Personal score-history control gets a quiet dashed focus treatment. */
  html:not(.reduced-motion) [data-private-open]{outline:1px dashed transparent;outline-offset:5px;transition:outline-color .2s ease,outline-offset .2s ease}
  html:not(.reduced-motion) [data-private-open]:is(:hover,:focus-visible){outline-offset:2px;outline-color:#ffc9c2}
  /* 17 — Mark the current book chapter with a narrow red letterpress crease. */
  html:not(.reduced-motion) .history-verso [data-book-chapter]{
    background-image:linear-gradient(#943023,#943023);background-size:0 100%;background-repeat:no-repeat;
    transition:background-size .2s ease;
  }
  html:not(.reduced-motion) .history-verso [data-book-chapter][aria-current=page]{
    background-image:linear-gradient(#94302366,#94302366);background-size:2px 100%;background-repeat:no-repeat;
  }
  html:not(.reduced-motion) .history-verso [data-book-chapter]{padding-inline-start:6px}
  /* 18 — Contact number selects a violet rule without moving the tap area. */
  html:not(.reduced-motion) .contact-direct>strong a{
    background:linear-gradient(90deg,#ffafbc,#a275c2) left 94%/0 1px no-repeat;
    transition:background-size .28s ease,color .25s ease;
  }
  html:not(.reduced-motion) .contact-direct>strong a:is(:hover,:focus-visible){background-size:100% 1px}
  /* 19 — Detail breadcrumbs peel their plus away from the text. */
  html:not(.reduced-motion) .detail-back span{display:inline-block;transition:rotate .28s ease,translate .28s ease}
  html:not(.reduced-motion) .detail-back:is(:hover,:focus-visible) span{rotate:-45deg;translate:-3px 0}
  /* 20 — At the footer, the back-to-top cross lifts through its own cell. */
  html:not(.reduced-motion) .back-top span{display:inline-block;transition:translate .26s ease}
  html:not(.reduced-motion) .back-top:is(:hover,:focus-visible) span{translate:0 -5px}
  html:not(.reduced-motion) .site-header .mobile-work[data-ux-current]{position:relative}
  html:not(.reduced-motion) .site-header a[data-ux-current]::before{
    content:"";position:absolute;inset:auto auto 0 calc(50% - 2px);width:4px;height:4px;
    border-radius:50%;background:#ffc2b9;pointer-events:none;
    animation:karz-ux-location .27s ease both;
  }
  @keyframes karz-ux-location{from{opacity:0;scale:.25;translate:0 3px}to{opacity:1;scale:1;translate:0 0}}
}
