/* trendly.fashion homepage, Nov 28 2026: the library shows that AI reads every product photo.
   Layered on home-simple-20261127/home.css; nothing there changes. */

/* Copy sits further left, on the same left edge as the screens below it (.view uses --side). */
@media (min-width:761px){.lib-copy{max-width:none;margin:0;padding-left:var(--side);padding-right:var(--side)}.readout{right:var(--side)}}
.lib-copy>p{max-width:540px}
.lib .eyebrow .ai-mark{display:inline-flex;align-items:center;gap:6px}
.ai-spark{display:inline-block;width:14px;height:14px;flex:none}
.ai-spark path{fill:currentColor}

/* The lit product: a scan line passes over it, with viewfinder corners while it is read. */
.sc-tile .ai-scan{position:absolute;inset:0;z-index:2;pointer-events:none;opacity:0}
.sc-tile .ai-scan::before{content:"";position:absolute;left:0;right:0;top:0;height:34%;
  background:linear-gradient(180deg,rgba(125,222,143,0) 0%,rgba(125,222,143,.22) 82%,rgba(190,255,200,.95) 100%);
  transform:translateY(-100%)}
.sc-tile .ai-scan::after{content:"";position:absolute;inset:7px;border-radius:2px;
  background:
    linear-gradient(#7dde8f,#7dde8f) left top/14px 2px no-repeat,linear-gradient(#7dde8f,#7dde8f) left top/2px 14px no-repeat,
    linear-gradient(#7dde8f,#7dde8f) right top/14px 2px no-repeat,linear-gradient(#7dde8f,#7dde8f) right top/2px 14px no-repeat,
    linear-gradient(#7dde8f,#7dde8f) left bottom/14px 2px no-repeat,linear-gradient(#7dde8f,#7dde8f) left bottom/2px 14px no-repeat,
    linear-gradient(#7dde8f,#7dde8f) right bottom/14px 2px no-repeat,linear-gradient(#7dde8f,#7dde8f) right bottom/2px 14px no-repeat}
.sc-tile.is-reading .ai-scan{opacity:1;transition:opacity .25s}
.sc-tile.is-reading .ai-scan::before{animation:ai-sweep 1.05s cubic-bezier(.45,.05,.4,1) forwards}
@keyframes ai-sweep{0%{transform:translateY(-100%)}100%{transform:translateY(300%)}}
.lib.has-ai .sc-tile.is-lit .sc-cap{opacity:0}
.lib.has-ai .sc-tile.is-lit{box-shadow:0 0 0 1.5px #7dde8f,0 26px 60px rgba(0,0,0,.65)}

/* The pattern card, pinned beside the first product: black with white text (green is kept for the lines and the scan only) */
.ai-card{position:absolute;z-index:5;top:0;left:0;width:clamp(240px,16vw,290px);padding:14px 16px 15px;border-radius:14px;
  background:rgba(14,14,13,.9);border:1px solid rgba(255,255,255,.16);color:var(--white);font:400 14px/1.3 var(--body);pointer-events:none;
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 34px 80px rgba(0,0,0,.65),0 0 0 1px rgba(0,0,0,.4);
  opacity:0;scale:.96;transform:translate3d(var(--x,0),var(--y,0),0);transition:opacity .35s ease,scale .35s ease}
.ai-card.is-on{opacity:1;scale:1}
.ai-card::after{content:"";position:absolute;top:calc(50% - 1px);right:-28px;width:28px;height:1.5px;
  background:linear-gradient(90deg,rgba(255,255,255,.9),rgba(255,255,255,0))}
.ai-card.on-right::after{right:auto;left:-28px;background:linear-gradient(270deg,rgba(255,255,255,.9),rgba(255,255,255,0))}
.ai-head{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--white)}
.ai-state{color:var(--mute)}
.ai-card.is-matched .ai-state{color:var(--white)}
.ai-thumbs{display:grid;grid-template-columns:repeat(var(--n,7),minmax(0,42px));gap:5px;margin:12px 0 11px}
.ai-th{display:block;aspect-ratio:3/4;border-radius:4px;overflow:hidden;background:#222220;
  opacity:0;transform:translate3d(0,6px,0) scale(.85);transition:opacity .3s ease,transform .45s cubic-bezier(.18,.9,.24,1.12)}
.ai-th.is-in{opacity:1;transform:none}
.ai-th img{display:block;width:100%;height:100%;object-fit:cover}
.ai-th:first-child{box-shadow:0 0 0 1.5px #fff}
.ai-pname,.ai-pline,.ai-pcount{opacity:0;transform:translate3d(0,4px,0);transition:opacity .35s ease,transform .45s ease}
.ai-card.is-matched .ai-pname,.ai-card.is-matched .ai-pline,.ai-card.is-matched .ai-pcount{opacity:1;transform:none}
.ai-card.is-matched .ai-pline{transition-delay:.08s}
.ai-pname{display:flex;align-items:center;gap:8px;font:600 clamp(19px,1.35vw,23px)/1.1 var(--display);letter-spacing:-.02em;color:var(--white)}
.ai-pline{margin-top:6px;color:var(--dim);font-size:13px;line-height:1.35}
.ai-pcount{margin-top:8px;color:var(--mute);font-size:12px;letter-spacing:.02em}
.ai-card.is-matched .ai-pcount{transition-delay:.12s}
.ai-sw{width:14px;height:14px;border-radius:50%;flex:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)}

/* Pattern matching: lines from the read product to the others that share its font, graphic, print or color */
.ai-links{position:absolute;inset:0;z-index:4;width:100%;height:100%;pointer-events:none;overflow:visible}
.ai-links line{stroke:#7dde8f;stroke-width:1.5;stroke-opacity:.85;stroke-dasharray:1;stroke-dashoffset:1;
  filter:drop-shadow(0 0 4px rgba(125,222,143,.6));transition:stroke-dashoffset .55s cubic-bezier(.3,.7,.2,1)}
.ai-links line.is-drawn{stroke-dashoffset:0}
.sc-tile.is-match{z-index:2;box-shadow:0 0 0 1.5px #7dde8f,0 0 26px rgba(125,222,143,.35)}
.sc-tile.is-match::after{opacity:.1}
.lib.has-ai .sc-tile.is-match .sc-cap{opacity:0}

/* Phones and small tablets: the wall sits behind the words, so the card is not shown. */
@media (max-width:900px){.ai-card,.ai-links{display:none}.sc-tile.is-match{box-shadow:none}.sc-tile.is-match::after{opacity:1}.lib.has-ai .sc-tile.is-lit .sc-cap{opacity:1}}
@media (prefers-reduced-motion:reduce){.ai-card,.sc-tile .ai-scan{display:none}}
