/* Editorial motion: a tailor's thread, photographic reveal, tactile product cards.
   Content is visible before JavaScript runs. */
:root { --cv-ink: #075668; --cv-thread: #b89769; }

.cv-scroll-thread {
  position: fixed; top: 0; left: 0; z-index: 10000;
  width: 100%; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--cv-ink), #188ca1 76%, var(--cv-thread));
  transform: scaleX(0); transform-origin: left center;
  will-change: transform;
}
.cv-motion-in {
  animation: cv-motion-reveal .82s cubic-bezier(.18,.72,.22,1) both;
  animation-delay: var(--cv-motion-delay, 0ms);
}
.cv-motion-hero {
  animation: cv-motion-hero .92s cubic-bezier(.18,.72,.22,1) both;
  animation-delay: var(--cv-motion-delay, 0ms);
}
@keyframes cv-motion-reveal {
  from { opacity: .18; transform: translate3d(var(--cv-motion-x, 0px), 34px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes cv-motion-hero {
  from { opacity: 0; transform: translate3d(0, 42px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* A measured line draws beneath editorial headings. */
.cv-seam-heading { position: relative; padding-bottom: .38em; }
.cv-seam-heading::after {
  content: ""; position: absolute; bottom: 0; left: 0;
  width: min(108px, 40%); height: 2px;
  background: linear-gradient(90deg, var(--cv-thread), var(--cv-ink));
  transform: scaleX(0); transform-origin: left center;
  transition: transform .85s cubic-bezier(.18,.72,.22,1);
}
.cv-seam-heading--visible::after { transform: scaleX(1); }
.made-to-measure-overview .mtm-intro .cv-seam-heading::after,
.seo-home-hero-copy .cv-seam-heading::after { left: 50%; transform: translateX(-50%) scaleX(0); }
.made-to-measure-overview .mtm-intro .cv-seam-heading--visible::after,
.seo-home-hero-copy .cv-seam-heading--visible::after { transform: translateX(-50%) scaleX(1); }

/* Product details use the same seam and photographic language as the overview. */
.produkt #product-body .cv-seam-heading.text-xs-center::after,
.produkt #product-body .seo-attributes-heading.cv-seam-heading::after,
.produkt #product-heading .cv-seam-heading::after {
  left: 50%; transform: translateX(-50%) scaleX(0);
}
.produkt #product-body .cv-seam-heading--visible.text-xs-center::after,
.produkt #product-body .seo-attributes-heading.cv-seam-heading--visible::after,
.produkt #product-heading .cv-seam-heading--visible::after {
  transform: translateX(-50%) scaleX(1);
}
.produkt #product-heading .cv-seam-heading::after,
.produkt #product-body .seo-attributes-heading.cv-seam-heading::after {
  background: linear-gradient(90deg, #d5b37f, #fff);
}
.produkt #product-gallery-slider.cv-gallery-reveal {
  animation: cv-image-unfold 1.05s cubic-bezier(.65,0,.25,1) both;
}
.produkt #product-attributes .single-product-attribute,
.produkt #product-options .cv-price-category,
.produkt .seo-half-canvas-item,
.produkt .seo-fabrics-grid > .col,
.produkt .seo-delivery-item { position: relative; }
.produkt #product-attributes .single-product-attribute::before,
.produkt #product-options .cv-price-category::before,
.produkt .seo-half-canvas-item::before,
.produkt .seo-delivery-item::before {
  content: ""; position: absolute; inset: 0 auto auto 0; z-index: 1;
  width: 100%; height: 2px; background: var(--cv-thread);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .45s cubic-bezier(.18,.72,.22,1);
  pointer-events: none;
}

/* A fabric-coloured curtain exposes photography as it enters the viewport. */
.mtm-photo.cv-photo-reveal::after,
.seo-product-tile.cv-photo-reveal::after,
.cvf-team.cv-photo-reveal::after,
.why-us-image.cv-photo-reveal::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background: linear-gradient(110deg, #e6ebea 0%, #b9cdd0 72%, #b89769 100%);
  animation: cv-photo-curtain .95s cubic-bezier(.65,0,.25,1) both;
}
@keyframes cv-photo-curtain {
  0% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 100%); }
}
.cvf-team, .seo-product-tile, .why-us-image { position: relative; overflow: hidden; }
.cvf-split > img.cv-image-reveal {
  animation: cv-image-unfold .95s cubic-bezier(.65,0,.25,1) both;
}
@keyframes cv-image-unfold {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
.made-to-measure-overview .mtm-card { position: relative; }
.made-to-measure-overview .mtm-card::before {
  content: ""; position: absolute; inset: 0 auto auto 0; z-index: 3;
  width: 100%; height: 3px; background: var(--cv-thread);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .45s cubic-bezier(.18,.72,.22,1);
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .made-to-measure-overview .mtm-card,
  .process .process-item,
  .features .feature-card,
  .cv-company .cvf-offer article,
  .cv-company .cvf-step {
    transition: transform .45s cubic-bezier(.18,.72,.22,1),
                box-shadow .45s ease, border-color .45s ease;
  }
  .made-to-measure-overview .mtm-card:hover,
  .made-to-measure-overview .mtm-card:focus-within,
  .process .process-item:hover,
  .features .feature-card:hover,
  .cv-company .cvf-offer article:hover,
  .cv-company .cvf-step:hover {
    transform: translateY(-9px);
    box-shadow: 0 22px 44px rgba(9, 47, 59, .17);
    border-color: #a8c4c9;
  }
  .made-to-measure-overview .mtm-card:hover::before,
  .made-to-measure-overview .mtm-card:focus-within::before { transform: scaleX(1); }
  .made-to-measure-overview .mtm-photo img,
  .seo-product-tile img {
    transition: transform .7s cubic-bezier(.18,.72,.22,1), opacity .35s ease;
  }
  .made-to-measure-overview .mtm-card:hover .mtm-photo img,
  .made-to-measure-overview .mtm-card:focus-within .mtm-photo img,
  .seo-product-tile:hover img,
  .seo-product-tile:focus-visible img { transform: scale(1.07); }
  .produkt #product-attributes .single-product-attribute,
  .produkt #product-options .cv-price-category,
  .produkt .seo-half-canvas-item,
  .produkt .seo-fabrics-grid > .col,
  .produkt .seo-delivery-item {
    transition: transform .45s cubic-bezier(.18,.72,.22,1), box-shadow .45s ease;
  }
  .produkt #product-attributes .single-product-attribute:hover,
  .produkt #product-options .cv-price-category:hover,
  .produkt .seo-half-canvas-item:hover,
  .produkt .seo-fabrics-grid > .col:hover,
  .produkt .seo-delivery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(9,47,59,.12);
  }
  .produkt #product-attributes .single-product-attribute:hover::before,
  .produkt #product-options .cv-price-category:hover::before,
  .produkt .seo-half-canvas-item:hover::before,
  .produkt .seo-delivery-item:hover::before { transform: scaleX(1); }
  .produkt #product-gallery-slider a[data-lightbox] { display: block; overflow: hidden; }
  .produkt #product-gallery-slider .product-gallery-image,
  .produkt #product-attributes .single-product-attribute .image img {
    transition: transform .7s cubic-bezier(.18,.72,.22,1);
  }
  .produkt #product-gallery-slider a[data-lightbox]:hover .product-gallery-image,
  .produkt #product-gallery-slider a[data-lightbox]:focus-visible .product-gallery-image,
  .produkt #product-attributes .single-product-attribute:hover .image img { transform: scale(1.06); }
}

.cv-photo-toggle { display: none; }
@media (hover: none), (pointer: coarse) {
  .made-to-measure-overview .cv-photo-toggle {
    display: inline-flex; align-items: center; align-self: flex-end;
    position: relative; z-index: 4; min-height: 40px;
    margin: -54px 12px 14px 0; padding: 7px 13px;
    border: 1px solid #c6d7d9; border-radius: 2px;
    background: rgba(255,255,255,.96); color: var(--cv-ink);
    font: 500 13px/1.35 Poppins, Arial, sans-serif;
    box-shadow: 0 3px 12px rgba(9,47,59,.12);
    cursor: pointer;
  }
  .made-to-measure-overview .cv-photo-toggle:focus-visible {
    outline: 2px solid var(--cv-thread); outline-offset: 2px;
  }
  .made-to-measure-overview .mtm-card.cv-preview-active .mtm-photo img+img { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cv-scroll-thread { display: none; }
  .cv-motion-in, .cv-motion-hero,
  .mtm-photo.cv-photo-reveal::after,
  .seo-product-tile.cv-photo-reveal::after,
  .cvf-team.cv-photo-reveal::after,
  .why-us-image.cv-photo-reveal::after,
  .cvf-split > img.cv-image-reveal { animation: none !important; }
  .produkt #product-gallery-slider.cv-gallery-reveal { animation: none !important; }
  .cv-seam-heading::after { transform: none !important; transition: none !important; }
  .made-to-measure-overview .mtm-card,
  .made-to-measure-overview .mtm-card::before,
  .made-to-measure-overview .mtm-photo img,
  .seo-product-tile img,
  .process .process-item,
  .features .feature-card,
  .cv-company .cvf-offer article,
  .cv-company .cvf-step,
  .produkt #product-attributes .single-product-attribute,
  .produkt #product-options .cv-price-category,
  .produkt .seo-half-canvas-item,
  .produkt .seo-fabrics-grid > .col,
  .produkt .seo-delivery-item,
  .produkt #product-gallery-slider .product-gallery-image,
  .produkt #product-attributes .single-product-attribute .image img { transition: none !important; }
}
