/* =========================================================
   Visual effects layer. Remove the <link> to this file to turn it all off.
   ========================================================= */

/* smooth cross-fade between pages (supported in current Chrome, Edge, Safari) */
@view-transition { navigation: auto; }

/* ---- scroll progress ---- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: linear-gradient(90deg, var(--blue), var(--sky)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---- glass header that gains depth on scroll ---- */
.site-header { transition: box-shadow .25s ease, background .25s ease; }
.site-header.scrolled { box-shadow: 0 8px 30px -14px rgba(10,10,10,.35); background: rgba(255,255,255,.78); }
.logo img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.logo:hover img { transform: rotate(90deg) scale(1.05); }

/* ---- buttons: light sweep ---- */
.btn-primary, .btn-dark { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after, .btn-dark::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); translate: -120% 0; transition: translate .7s ease; }
.btn-primary:hover::after, .btn-dark:hover::after { translate: 120% 0; }
.btn-primary { box-shadow: 0 10px 24px -10px var(--blue); }

/* ---- hero: drifting gradient mesh + faint weave ---- */
.hero, .page-hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before, .hero::after, .page-hero:not(.dark)::before { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.hero::before { width: 46rem; height: 46rem; left: -14rem; top: -18rem; background: radial-gradient(circle, rgba(25,93,187,.28), transparent 65%); animation: drift 16s ease-in-out infinite alternate; }
.hero::after { width: 40rem; height: 40rem; right: -12rem; bottom: -16rem; background: radial-gradient(circle, rgba(156,201,255,.8), transparent 65%); animation: drift 20s ease-in-out infinite alternate-reverse; }
.page-hero:not(.dark)::before { width: 34rem; height: 34rem; right: -8rem; top: -14rem; background: radial-gradient(circle, rgba(156,201,255,.8), transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.hero > .wrap, .page-hero > .wrap { position: relative; }
.hero .weave-bg { position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(25,93,187,.07) 0 1px, transparent 1px 22px), repeating-linear-gradient(90deg, rgba(25,93,187,.07) 0 1px, transparent 1px 22px);
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0, transparent 70%); }
@keyframes drift { to { translate: 5rem 3rem; scale: 1.15; } }

/* hero headline: highlight draws itself in */
.hero h1 .mark { background-repeat: no-repeat; background-size: 0% 100%; animation: draw 1s .5s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes draw { to { background-size: 100% 100%; } }

/* hero swatches follow the pointer, each at its own depth */
.fan .sw { translate: calc(var(--mx, 0) * var(--d, 1) * 16px) calc(var(--my, 0) * var(--d, 1) * 12px); }
.fan .sw:nth-child(1) { --d: .6; } .fan .sw:nth-child(2) { --d: 1.2; } .fan .sw:nth-child(3) { --d: 1.8; } .fan .sw:nth-child(4) { --d: 2.4; }
.fan .tagline { backdrop-filter: blur(8px); background: rgba(10,10,10,.85); }
.hero-search { transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease; }
.hero-search:focus-within { transform: translateY(-2px); }

/* ---- marquee of real fabric colorways ---- */
.marquee { overflow: hidden; padding-block: 1.75rem; border-block: 1px solid var(--line); background: var(--white); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: .85rem; width: max-content; animation: scroll 70s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq { flex: none; width: 150px; height: 84px; border-radius: 14px; position: relative; overflow: hidden; border: 1px solid rgba(10,10,10,.08); text-decoration: none; }
.mq span { position: absolute; left: .5rem; bottom: .4rem; font-size: .75rem; font-weight: 700; background: rgba(255,255,255,.9); color: var(--ink); padding: .05rem .5rem; border-radius: 999px; }
@keyframes scroll { to { translate: -50% 0; } }

/* ---- scroll reveal ---- */
.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .7s ease, translate .7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--delay, 0s); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---- product cards: cursor spotlight + lift ---- */
.product { position: relative; }
.product::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(260px circle at var(--px, 50%) var(--py, 50%), rgba(25,93,187,.12), transparent 70%); }
.product:hover::before { opacity: 1; }
.product .actions, .product .body { position: relative; z-index: 2; }
.product { transition: box-shadow .3s ease, transform .3s cubic-bezier(.2,.8,.2,1), border-color .2s ease; }
.product:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -22px rgba(25,93,187,.45); }
.sd { transition: transform .15s ease, outline-color .15s ease; }
.sd[aria-pressed="true"] { transform: scale(1.18); }

/* category tiles get a color wash on hover */
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--blue); mix-blend-mode: multiply; opacity: 0; transition: opacity .35s ease; }
.tile:hover::before { opacity: .45; }
.tile div { transition: translate .35s ease; } .tile:hover div { translate: 0 -.4rem; }

/* ---- dark sections: glowing gradient ---- */
.dark-sec, .page-hero.dark { position: relative; overflow: hidden; isolation: isolate; }
.dark-sec::before, .page-hero.dark::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(700px circle at 15% 0%, rgba(25,93,187,.55), transparent 60%), radial-gradient(600px circle at 95% 100%, rgba(156,201,255,.2), transparent 60%); }
.cap-item { transition: translate .3s ease, border-color .3s ease; }
.cap-item:hover { translate: 0 -6px; border-color: #fff; }

/* ---- CTA band: moving gradient ---- */
.cta-band { background: linear-gradient(120deg, #195dbb, #123f82 45%, #0a0a0a); background-size: 200% 200%; animation: shift 12s ease-in-out infinite alternate; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -4rem; top: -4rem; width: 16rem; height: 16rem; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); box-shadow: 0 0 0 2rem rgba(255,255,255,.05), 0 0 0 4rem rgba(255,255,255,.03); pointer-events: none; }
@keyframes shift { to { background-position: 100% 100%; } }

/* ---- other small touches ---- */
.value, blockquote, .person .avatar { transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease; }
.value:hover, .person:hover .avatar { transform: translateY(-5px); box-shadow: var(--shadow); }
.steps li::before { transition: transform .3s ease, background .3s ease; }
.steps li:hover::before { transform: scale(1.12) rotate(-6deg); background: var(--ink); }
.gallery .main { transition: box-shadow .3s ease; }
.zoom .sw { transition: transform-origin .08s linear; }
.chip, .dot { transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.chip:active, .dot:active { transform: scale(.94); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: 0 0; transition: none; }
  .hero::before, .hero::after, .page-hero::before, .cta-band, .marquee-track, .hero h1 .mark { animation: none !important; }
  .hero h1 .mark { background-size: 100% 100%; }
  .fan .sw { translate: none; }
  @view-transition { navigation: none; }
}
