/* Motion only: no typography, grid, spacing or final layout overrides. */
@keyframes tqm-failsafe { to { visibility:hidden; opacity:0; } }
@keyframes tqm-content-safe { to { visibility:visible; } }
html body #tequila-intro-loader { display:none !important; }
#tqm-loader { display:none; position:fixed; inset:0; z-index:20000; background:var(--color-lime,#d6ee92); color:var(--color-ink,#141414); align-items:center; justify-content:center; overflow:hidden; pointer-events:none; animation:tqm-failsafe 1ms 3400ms forwards; }
html.tqm-first #tqm-loader { display:flex; }
html.tqm-first { overflow:hidden; scrollbar-gutter:stable; }
html.tqm-first body { overscroll-behavior:none; }
#tqm-loader .tqm-greetings { --tqm-greeting-step:clamp(56px,8vh,80px); position:relative; width:min(80vw,360px); height:32px; font-family:inherit; font-size:clamp(18px,1.5vw,22px); font-weight:400; line-height:32px; text-align:center; user-select:none; }
#tqm-loader .tqm-greeting { position:absolute; inset:0; display:block; visibility:hidden; white-space:nowrap; }
html.tqm-pending :is(#home-title,#brxe-wktitl,main h1) { visibility:hidden; animation:tqm-content-safe 1ms 1800ms forwards !important; }
.tqm-transfer { position:fixed; pointer-events:none; z-index:19990; animation:tqm-failsafe 1ms 1800ms forwards; }
.tqm-veil { inset:0; background:var(--color-ink,#141414); }
.tqm-image { overflow:hidden; z-index:19991; }
.tqm-image img { display:block; width:100%; height:100%; object-fit:cover; }
html body :is(#brxe-tqmark,#brxe-tqhome,#brxe-tqhnav,#brxe-tqmtrg,#home-title,#projects-title,#process-title,#brxe-tqpt01,#brxe-tqpt02,#brxe-tqpt03) { animation:none !important; }
.tqm-line-mask { overflow:clip; overflow-clip-margin:.14em; }
/* Image loading reveal. The early boot class prevents cached images flashing in
   before JS can bind load/decode events. Layout is untouched. */
@keyframes tqm-image-in {
  from { opacity:0; clip-path:inset(0 0 10% 0); transform:scale(1.018); }
  to { opacity:1; clip-path:inset(0); transform:scale(1); }
}
@keyframes tqm-image-wait {
  from { transform:translate3d(-115%,0,0); }
  to { transform:translate3d(115%,0,0); }
}
html.tqm-images main img:not(.tqm-image-ready) {
  opacity:0;
  clip-path:inset(0 0 10% 0);
}
html.tqm-images main img.tqm-image-ready:not(.tqm-image-settled) {
  animation:tqm-image-in 900ms cubic-bezier(.3,0,.2,1) both;
}
html.tqm-images main .tqm-image-shell {
  position:relative;
  overflow:hidden;
  background-color:rgba(255,255,255,.035);
}
html.tqm-images main .tqm-image-shell::after {
  content:'';
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
  opacity:.72;
  background:linear-gradient(105deg,rgba(255,255,255,.015) 24%,rgba(214,238,146,.13) 44%,rgba(255,255,255,.18) 50%,rgba(214,238,146,.1) 56%,rgba(255,255,255,.015) 76%);
  animation:tqm-image-wait 1.25s ease-in-out infinite;
  transition:opacity 560ms cubic-bezier(.3,0,.2,1);
}
html.tqm-images main .tqm-image-shell.tqm-image-shell-ready::after {
  opacity:0;
}
/* The fallback font is wider than Instrument Serif while it loads. */
#process-title { overflow-x:clip; }
/* The legacy hero remains a working fallback when GSAP is unavailable. */
html body #home-intro[data-tqm-hero] { height:260svh; }
html body #home-intro[data-tqm-hero][data-tqm-landscape] { height:180svh; }
html body #home-intro[data-tqm-hero] #brxe-tqwrap { position:sticky; top:0; }
html body #home-intro[data-tqm-hero] #brxe-hvfram { animation:none !important; transform-origin:0 0; }
@media (max-width:1024px) {
  /* Aspect-ratio safety also applies to the legacy/no-GSAP and reduced-motion path. */
  html body #home-intro:not([data-tqm-hero]) #brxe-hvfram { height:auto !important; aspect-ratio:16 / 9; }
  html body #home-intro #brxe-hvideo video { object-fit:contain; }
}
html body [data-tqm-hover] img { transition:none !important; }
html body [data-tqm-hover]:focus-visible { outline:2px solid currentColor; outline-offset:5px; }
/* Work: the featured image becomes a lime/ink halftone on hover. The layers
   stay inside the existing post link, so its destination and hit area remain. */
html body .brxe-wkcard[data-tqm-work-card] { isolation:isolate; border-radius:10px; }
html body .brxe-wkcard[data-tqm-work-card]:hover .brxe-wkimag { transform:none; filter:none; }
.tqm-work-halftone,.tqm-work-services { display:none; pointer-events:none; }
@media (min-width:768px) and (hover:hover) and (pointer:fine) {
  .tqm-work-halftone {
    display:block; position:absolute; inset:0; z-index:1; overflow:hidden;
    border-radius:inherit; background:var(--color-lime,#d6ee92);
    opacity:0; transform:scale(1.055);
    transition:opacity 450ms cubic-bezier(.22,.61,.36,1),transform 600ms cubic-bezier(.16,1,.3,1);
  }
  .tqm-work-halftone::before {
    content:""; position:absolute; inset:-2%; background-image:var(--tqm-work-image);
    background-size:cover; background-position:center; mix-blend-mode:multiply;
    filter:grayscale(1) contrast(2.5) brightness(1.05);
    -webkit-mask-image:radial-gradient(circle,#000 49%,transparent 53%);
    mask-image:radial-gradient(circle,#000 49%,transparent 53%);
    -webkit-mask-size:9px 9px; mask-size:9px 9px;
  }
  .tqm-work-halftone::after {
    content:""; position:absolute; inset:0;
    background:radial-gradient(circle,var(--color-ink,#141414) 19%,transparent 23%) 0 0/7px 7px;
    opacity:.23;
  }
  .tqm-work-services {
    display:flex; position:absolute; z-index:2; top:20px; left:20px;
    flex-direction:column; align-items:flex-start; gap:6px;
    width:max-content; max-width:calc(100% - 40px);
    opacity:0; transform:translateY(10px);
    transition:opacity 280ms ease,transform 450ms cubic-bezier(.16,1,.3,1);
  }
  .tqm-work-service {
    display:inline-flex; align-items:center; justify-content:center;
    box-sizing:border-box; width:max-content; min-height:36px;
    padding:11px 22px; border-radius:999px;
    background:var(--color-cream,#fffdf0); color:var(--color-ink,#141414);
    font-family:var(--font-body,monospace); font-size:12px; line-height:1.1;
    font-weight:400; white-space:nowrap;
  }
  .brxe-wkcard[data-tqm-work-card]:is(:hover,:focus-visible) .tqm-work-halftone { opacity:1; transform:scale(1); }
  .brxe-wkcard[data-tqm-work-card]:is(:hover,:focus-visible) .tqm-work-services { opacity:1; transform:translateY(0); }
}
@media (prefers-reduced-motion:reduce) {
  .tqm-work-halftone,.tqm-work-services { transition:none !important; }
}
/* Preserve the site's native link / FAQ / button patterns. */
#tequila-header :is(a,button):focus-visible,#tequila-footer a:focus-visible { outline:1px solid currentColor; outline-offset:4px; }
html body #tequila-header :is(a,button):not(.brxe-toggle):hover { text-decoration-line:none; }
html body :is(#brxe-tqnavh,#brxe-tqnavw,#brxe-tqnavc,#brxe-mclose) {
  background-image:linear-gradient(currentColor,currentColor);
  background-repeat:no-repeat;
  background-position:0 100%;
  background-size:0% 1px;
  text-decoration:none;
  transition:background-size 240ms cubic-bezier(.2,.7,.2,1),color 180ms ease;
}
html body :is(#brxe-tqnavh,#brxe-tqnavw,#brxe-tqnavc,#brxe-mclose):is(:hover,:focus-visible) { background-size:100% 1px; text-decoration:none; }
html body #tequila-contact-dialog #brxe-mclose:is(:hover,:focus-visible) { text-decoration-line:none; }
html body #brxe-tqpcta [data-projects-cta-arrow] span { transition:transform 240ms cubic-bezier(.2,.7,.2,1); }
html body #brxe-tqpcta:is(:hover,:focus-visible) [data-projects-cta-arrow] span { transform:translateX(3px); }
html body :is(#brxe-bgclnt,#brxe-pbclnt,#brxe-rdclnt,#brxe-pxclnt,#brxe-fkclnt,#brxe-orclnt) { transition:transform 220ms cubic-bezier(.2,.7,.2,1),background-color 220ms ease,color 220ms ease; }
/* Blur is present immediately; fade its layer, not an expensive blur radius. */
html body .brx-popup.brxe-popup-47:not(.brx-infobox-popup):not(.brx-infobox-popup-builder) { transition:visibility 0s; }
html body .brx-popup.brxe-popup-47:not(.brx-infobox-popup):not(.brx-infobox-popup-builder).hide { transition-delay:220ms; }
html body .brx-popup.brxe-popup-47 .brx-popup-backdrop { backdrop-filter:blur(10px); transition:opacity 220ms cubic-bezier(.2,.7,.2,1); }
html body .brx-popup.brxe-popup-47 .brx-popup-content { transition:opacity 220ms cubic-bezier(.2,.7,.2,1),transform 300ms cubic-bezier(.16,1,.3,1); }
html body .brx-popup.brxe-popup-47.hide .brx-popup-content { transform:translateY(10px) scale(.985); transition-duration:180ms; }
html body .brx-popup.brxe-popup-47 #tequila-contact-dialog > * { animation:none !important; }
@media (prefers-reduced-motion:reduce) {
  html.tqm-pending :is(#home-title,#brxe-wktitl,main h1) { visibility:visible; }
  html body #tqm-loader,html body .tqm-transfer { display:none !important; }
  html body .brx-popup.brxe-popup-47,html body .brx-popup.brxe-popup-47 .brx-popup-content,html body .brx-popup.brxe-popup-47 .brx-popup-backdrop { transition:none !important; transform:none !important; }
  html body :is(.brxe-wkcard img,#brxe-tqpgrd img,[data-projects-cta-arrow] span,[data-faq-icon],#tequila-mobile-menu,#tequila-mobile-menu a) { transition:none !important; animation:none !important; transform:none !important; }
  html body :is(#brxe-tqnavh,#brxe-tqnavw,#brxe-tqnavc,#brxe-mclose) { transition:none; }
  html.tqm-images main img,html.tqm-images main img:not(.tqm-image-ready) { opacity:1; clip-path:none; animation:none; transition:none; }
  html.tqm-images main .tqm-image-shell::after { display:none; animation:none; transition:none; }
}
