/* The living layer: one authored hero moment, one material-search instrument,
   state feedback on registers and a restrained ambient lattice on light pages. */

:root{--alive-ease:cubic-bezier(.16,1,.3,1);--alive-fast:160ms;--alive-mid:280ms}

/* Page entrance: the title arrives, the rest does not perform. */
@keyframes alive-title{from{opacity:0;transform:translateY(18px) skewY(.6deg)}to{opacity:1;transform:none}}
@keyframes alive-fade{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.page-heading h1,.taxonomy-heading h1,.directory-heading h1,.catalog-head h1,.product-title-copy h1,.article-title,.hero-lead h1{animation:alive-title .72s var(--alive-ease) both}
.page-heading p,.taxonomy-heading p,.directory-heading p,.catalog-intro,.product-summary,.article-deck{animation:alive-fade .8s var(--alive-ease) .08s both}
.page-meta,.taxonomy-meta,.directory-meta,.catalog-head .catalog-search{animation:alive-fade .7s var(--alive-ease) .14s both}

/* Ambient engineering lattice in the light-page hero. */
.page-hero,.taxonomy-hero,.directory-hero,.catalog-head,.product-hero{position:relative;isolation:isolate;overflow:hidden}
.page-hero::after,.taxonomy-hero::after,.directory-hero::after,.catalog-head::after,.product-hero::after{
  content:'';position:absolute;z-index:-1;right:-4%;top:-35%;width:48%;height:170%;
  background:url('/img/home-v2/lattice-light.svg') center / contain no-repeat;
  opacity:.38;pointer-events:none;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 34%,#000 100%);
  mask-image:linear-gradient(90deg,transparent 0%,#000 34%,#000 100%);
  animation:lattice-breathe 16s ease-in-out infinite alternate;
}
.page-hero>*,.taxonomy-hero>*,.directory-hero>*,.catalog-head>*,.product-hero>*{position:relative;z-index:1}
@keyframes lattice-breathe{from{transform:translate3d(0,-6px,0) scale(1)}to{transform:translate3d(-14px,8px,0) scale(1.035)}}
@media(max-width:760px){.page-hero::after,.taxonomy-hero::after,.directory-hero::after,.catalog-head::after,.product-hero::after{width:86%;right:-36%;top:-25%;opacity:.24;height:150%}}

/* Homepage: line-art lattice over the dark photographic field, pointer-parallax. */
.hero-lattice{position:absolute;z-index:-1;left:-7%;bottom:-16%;top:auto;right:auto;width:min(840px,66vw);height:auto;opacity:.7;pointer-events:none;mix-blend-mode:screen;transform:translate3d(var(--lx,0px),var(--ly,0px),0);transition:transform .6s var(--alive-ease);
  -webkit-mask-image:linear-gradient(90deg,#000 0%,#000 52%,transparent 92%);
  mask-image:linear-gradient(90deg,#000 0%,#000 52%,transparent 92%);
}
.hero::after{content:'';position:absolute;inset:0;z-index:-1;background:radial-gradient(380px circle at var(--hx,72%) var(--hy,38%),rgba(217,52,42,.24),transparent 66%);mix-blend-mode:screen;pointer-events:none;transition:background .3s}
@media(max-width:760px){.hero-lattice{width:125vw;left:-38%;bottom:-8%;top:auto;opacity:.35}.hero::after{display:none}}

/* Command trigger in the header. */
.command-trigger{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:0 9px;border:1px solid var(--line);background:transparent;color:var(--muted);font:600 10px/1 Manrope,sans-serif;letter-spacing:.02em;transition:border-color var(--alive-fast),color var(--alive-fast),background var(--alive-fast)}
.command-trigger .i{width:14px;height:14px}
.command-trigger kbd{font:500 9px/1 Manrope,sans-serif;border:1px solid var(--line);padding:3px 4px;color:var(--muted)}
.command-trigger:hover{border-color:var(--ink);color:var(--ink);background:#ecefe8}
.command-trigger:focus-visible{outline:2px solid var(--red);outline-offset:3px}
@media(max-width:1250px){.command-trigger span,.command-trigger kbd{display:none}.command-trigger{width:38px;justify-content:center;padding:0}}
@media(max-width:850px){.command-trigger{width:44px;height:44px;min-height:44px;border-color:var(--line)}}

/* shadcn-style Command dialog. */
.command-dialog{border:0;padding:0;background:transparent;color:var(--ink);width:min(680px,calc(100vw - 32px));max-width:none;margin:11vh auto 0;overflow:visible}
.command-dialog::backdrop{background:rgba(23,28,25,.56);backdrop-filter:blur(2px);animation:command-backdrop .18s ease-out both}
.command-panel{background:var(--paper);border:1px solid #9da891;box-shadow:0 24px 70px rgba(20,25,20,.28),0 4px 12px rgba(20,25,20,.14);overflow:hidden;animation:command-in .22s var(--alive-ease) both}
.command-search{display:flex;align-items:center;gap:11px;border-bottom:1px solid var(--ink);padding:0 16px}
.command-search .i{width:18px;height:18px;color:var(--muted);flex-shrink:0}
.command-search input{flex:1;min-width:0;border:0;background:transparent;color:var(--ink);font:500 15px/1.4 Manrope,sans-serif;padding:17px 0;border-radius:0}
.command-search input::placeholder{color:#707a6c}
.command-search kbd{font:500 9px/1 Manrope,sans-serif;border:1px solid var(--line);padding:4px 5px;color:var(--muted);flex-shrink:0}
.command-results{max-height:min(58vh,520px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b7c0b1 transparent;padding:8px}
.command-group{padding:7px 0 4px}
.command-group[hidden]{display:none}
.command-group-label{font-size:9px;line-height:1.4;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);padding:4px 8px 6px;margin:0}
.command-item{display:flex;align-items:center;gap:11px;min-height:43px;padding:8px 10px;color:var(--ink);transition:background var(--alive-fast),color var(--alive-fast)}
.command-item:hover,.command-item.is-active{background:var(--ink);color:#fff;text-decoration:none}
.command-item[hidden]{display:none}
.command-item-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;border:1px solid var(--line)}
.command-item:hover .command-item-icon,.command-item.is-active .command-item-icon{border-color:#596457}
.command-item-icon .i{width:13px;height:13px}
.command-item-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.command-item-copy strong{font-size:12px;line-height:1.35;font-weight:600;letter-spacing:-.015em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.command-item-copy small{font-size:10px;line-height:1.35;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.command-item:hover .command-item-copy small,.command-item.is-active .command-item-copy small{color:#bdc8b6}
.command-item-arrow{width:15px;height:15px;flex-shrink:0;color:#909a8a;opacity:0;transform:translateX(-4px);transition:opacity var(--alive-fast),transform var(--alive-fast)}
.command-item-arrow .i{width:14px;height:14px}
.command-item:hover .command-item-arrow,.command-item.is-active .command-item-arrow{opacity:1;transform:none;color:#fff}
.command-search-action{border-bottom:1px solid var(--line);margin:0 0 3px;padding:11px 10px}
.command-empty{font-size:11px;line-height:1.6;color:var(--muted);padding:20px 10px;margin:0}
.command-foot{display:flex;align-items:center;gap:18px;flex-wrap:wrap;border-top:1px solid var(--line);padding:9px 16px;font-size:9px;line-height:1.4;color:var(--muted)}
.command-foot kbd{font:500 9px/1 Manrope,sans-serif;border:1px solid var(--line);padding:3px 4px;margin-right:3px;color:var(--ink)}
@keyframes command-backdrop{from{opacity:0}to{opacity:1}}
@keyframes command-in{from{opacity:0;transform:translateY(-10px) scale(.985)}to{opacity:1;transform:none}}
@media(max-width:560px){.command-dialog{margin-top:7vh;width:calc(100vw - 20px)}.command-search input{font-size:16px;padding:14px 0}.command-results{max-height:60vh}.command-foot{gap:10px;font-size:8px}.command-item{min-height:45px}}

/* Living registers: the row is the interaction, not a card. */
.catalog-row,.directory-row,.taxonomy-sibling,.about-chip,.search-result,.resource-card,.product-related{transition:background var(--alive-fast),color var(--alive-fast),transform var(--alive-fast)}
.catalog-row:hover{transform:translateX(2px)}
.catalog-row:hover .catalog-thumb{transform:scale(1.04) rotate(-1deg)}
.catalog-thumb{transition:transform var(--alive-mid) var(--alive-ease)}
.catalog-product-name strong,.directory-row-name,.taxonomy-sibling>span{transition:color var(--alive-fast)}
.catalog-row:hover .catalog-product-name strong,.directory-row:hover .directory-row-name,.taxonomy-sibling:hover>span{color:var(--deep-red)}
.directory-row:hover{background:#ecefe8;transform:translateX(2px)}
.directory-row>.i,.taxonomy-sibling>.i,.catalog-quote .i,.underlink .i{transition:transform var(--alive-mid) var(--alive-ease)}
.directory-row:hover>.i,.taxonomy-sibling:hover>.i{transform:translate(2px,-2px)}
.catalog-quote:hover .i,.underlink:hover .i,.button:hover .i{transform:translate(3px,-3px)}
.catalog-quote .i,.underlink .i{transform:none}
.button{position:relative;overflow:hidden}
.button::after{content:'';position:absolute;inset:0;background:linear-gradient(110deg,transparent 20%,rgba(255,255,255,.14) 45%,transparent 70%);transform:translateX(-120%);transition:transform .6s var(--alive-ease);pointer-events:none}
.button:hover::after{transform:translateX(120%)}
.button.light::after{background:linear-gradient(110deg,transparent 20%,rgba(217,52,42,.12) 45%,transparent 70%)}

/* Header nav: ink sweeps in from the left. */
.nav>a,.nav-trigger{position:relative}
.nav>a::after,.nav-trigger::after{content:'';position:absolute;left:0;right:0;bottom:5px;height:1px;background:var(--red);transform:scaleX(0);transform-origin:left;transition:transform var(--alive-mid) var(--alive-ease)}
.nav>a:hover::after,.nav-trigger:hover::after,.nav-trigger[aria-expanded=true]::after{transform:scaleX(1)}

/* Images inside resources and editorial blocks arrive with a crop, not a fade. */
.resource-feature-media img,.resource-card img,.about-photo img{transition:transform .7s var(--alive-ease),filter .4s ease}
.resource-feature:hover .resource-feature-media img,.resource-card:hover img{transform:scale(1.025)}
.about-photo:hover img{transform:scale(1.02)}

/* Count-up values keep the real number in the DOM until JS takes over. */
[data-count]{font-variant-numeric:tabular-nums}

/* Native tooltip role for price labels; data-tip is optional. */
[data-tip]{position:relative}
[data-tip]::after{content:attr(data-tip);position:absolute;z-index:60;left:0;bottom:calc(100% + 8px);max-width:260px;width:max-content;padding:7px 9px;background:var(--ink);color:#fff;font-size:10px;line-height:1.45;font-weight:400;letter-spacing:0;text-transform:none;opacity:0;transform:translateY(4px);pointer-events:none;transition:opacity var(--alive-fast),transform var(--alive-fast)}
[data-tip]:hover::after,[data-tip]:focus-visible::after{opacity:1;transform:none}
@media(max-width:760px){[data-tip]::after{display:none}}

@media(prefers-reduced-motion:reduce){
  .command-dialog::backdrop,.command-panel{animation:none}
  .page-heading h1,.taxonomy-heading h1,.directory-heading h1,.catalog-head h1,.product-title-copy h1,.article-title,.hero-lead h1,.page-heading p,.taxonomy-heading p,.directory-heading p,.catalog-intro,.product-summary,.article-deck,.page-meta,.taxonomy-meta,.directory-meta,.catalog-head .catalog-search{animation:none}
  .page-hero::after,.taxonomy-hero::after,.directory-hero::after,.catalog-head::after,.product-hero::after,.hero-lattice{animation:none;transition:none}
  .catalog-row:hover,.directory-row:hover{transform:none}
  .button::after{display:none}
}

@keyframes bar-grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.region-bar>div i{transform-origin:left;animation:bar-grow .9s var(--alive-ease) both}
@media(prefers-reduced-motion:reduce){.region-bar>div i{animation:none}}

.product-trade [data-tip]::after{background:var(--paper);color:var(--ink);border:1px solid var(--line)}

.product-plate{transition:transform .7s var(--alive-ease)}
.product-title-row:hover .product-plate{transform:scale(1.025) rotate(-.4deg)}
@media(prefers-reduced-motion:reduce){.product-title-row:hover .product-plate{transform:none}}

/* Command instrument — shadcn-style surface, tuned smooth. */
.command-dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:10vh 16px 0;border:0;background:transparent;overflow:auto;outline:none;align-items:flex-start;justify-content:center}
.command-dialog[open]{display:flex}
.command-dialog:focus,.command-dialog:focus-visible{outline:none}
.command-dialog::backdrop{background:rgba(23,28,25,.52);backdrop-filter:none}
.command-panel{width:min(680px,100%);margin:0 auto;background:var(--paper);border:1px solid #a7b09d;border-radius:14px;box-shadow:0 28px 80px rgba(18,24,18,.26),0 6px 20px rgba(18,24,18,.12);overflow:hidden;will-change:transform,opacity;animation:command-in .28s var(--alive-ease) both}
.command-search{border-bottom:1px solid var(--line);padding:0 18px;border-radius:14px 14px 0 0;transition:background .18s,border-color .18s}
.command-search:focus-within{background:#fbfcf8;border-bottom-color:var(--ink)}
.command-search input{outline:none!important;box-shadow:none!important;padding:18px 0;font-size:15px;line-height:1.4}
.command-search input:focus,.command-search input:focus-visible{outline:none!important;border:0!important;box-shadow:none!important}
.command-search kbd{border-radius:5px;padding:4px 6px;background:#eef1e9;border-color:#d9dfd4}
.command-results{padding:9px 10px 8px}
.command-group{padding:7px 0 5px}
.command-item{border-radius:8px;padding:9px 11px;transition:background .16s var(--alive-ease),color .16s var(--alive-ease),transform .16s var(--alive-ease)}
.command-item:hover,.command-item.is-active{background:#1d241f;color:#fff}
.command-item:focus{outline:none}
.command-item:focus-visible{outline:2px solid var(--red);outline-offset:-2px;background:#1d241f;color:#fff}
.command-item-icon{border-radius:6px;border-color:#d8ded3}
.command-item-arrow{transition:opacity .16s,transform .16s}
.command-search-action{border-radius:9px;border-bottom:1px solid var(--line);margin:0 0 4px;padding:12px 11px}
.command-search-action:hover,.command-search-action.is-active{border-bottom-color:#38463a}
.command-empty{text-align:left;padding:16px 12px}
.command-foot{border-radius:0 0 14px 14px;background:#f0f2ec;padding:10px 18px}
.command-foot kbd{border-radius:4px;background:#fff}
.command-trigger{border-radius:8px}
.command-trigger kbd{border-radius:4px}
@keyframes command-in{from{opacity:0;transform:translateY(-7px)}to{opacity:1;transform:none}}
@keyframes command-backdrop{from{opacity:0}to{opacity:1}}
.command-dialog::backdrop{animation:command-backdrop .2s ease-out both}
.command-skeleton{padding:5px 11px 8px}
.command-skeleton-row{display:flex;align-items:center;gap:11px;padding:9px 0}
.command-skeleton-dot{width:24px;height:24px;border-radius:6px;background:#e5eadf;flex-shrink:0;animation:command-shimmer 1.2s ease-in-out infinite}
.command-skeleton-line{height:8px;border-radius:4px;background:#e5eadf;animation:command-shimmer 1.2s ease-in-out infinite}
.command-skeleton-line.is-wide{width:58%}.command-skeleton-line.is-short{width:34%}
.command-skeleton-row:nth-child(2){animation-delay:.08s}
.command-skeleton-row:nth-child(3){animation-delay:.16s}
@keyframes command-shimmer{0%,100%{opacity:.55}50%{opacity:1}}
[data-command-product-group]{padding-top:4px}
[data-command-product-group] .command-item{animation:command-item-in .24s var(--alive-ease) both}
@keyframes command-item-in{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
@media(max-width:560px){.command-dialog{padding:7vh 10px 0}.command-panel{border-radius:12px}.command-search{padding:0 14px}.command-search input{font-size:16px;padding:15px 0}.command-results{max-height:62vh;padding:8px}.command-foot{padding:9px 14px}.command-item{min-height:46px;padding:9px 10px}}
@media(prefers-reduced-motion:reduce){.command-panel,.command-dialog::backdrop,[data-command-product-group] .command-item,.command-skeleton-dot,.command-skeleton-line{animation:none}}

[data-command-product-group] .command-item[data-command-product]{animation-delay:calc(var(--i,0) * 18ms)}

.command-trigger:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
