/*
================================================================
Space Vanta Theme 2.0
Module: Cart preview — logo palette layer
Path: public/sv-cart/preview-dna.css
Version: PREVIEW-DNA-001      (public: layout/theme.html, after preview.css)

Re-colours and adds depth/motion to the preview only. Structure,
hooks and behaviour stay in preview.js / preview.css. Everything is
scoped under .svcp, so nothing here can reach the header.

Colour weight for this area (the preview is a quick, small surface,
so it stays light and warm; the dark faces only frame it):
    warm paper 56 · silver faces 22 · gunmetal 16 · blue 6
  - head and foot are two gunmetal faces; the middle stays paper
  - Regular groups wear silver; Made to order groups wear the cooler
    steel-blue shard face of the logo, with a hatched edge
  - the blue appears only where something is live: the seam, the
    progress cells, the call to action
Motion: one seam drawn on open, one light pass over each thumbnail
as its group lands, a facet reveal for the groups. All off under
reduced motion / calm.
================================================================
*/

html .svcp {
  --svcp-blue: var(--svd-seam, #1d6bff);
  --svcp-blue-hi: var(--svd-seam-hi, #4d8dff);
}

/* ---- shell: a faceted rim, like the S ---- */
html .svcp__shell {
  background: linear-gradient(135deg, #fffbfa 0%, #aeb1b9 22%, #f1edea 46%, #616570 74%, #dbd9da 100%);
}
html .svcp__inner {
  background:
    linear-gradient(118deg, rgba(255, 251, 250, 0) 0 58%, rgba(219, 217, 218, 0.34) 58% 100%),
    var(--svcp-paper);
}

/* ---- head: gunmetal face + a seam that draws across ---- */
html .svcp__top {
  position: relative;
  background: var(--svd-face-deep);
  color: #fff;
  padding-bottom: 14px;
}
html .svcp__top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--svd-seam-line);
  transform-origin: left center;
  animation: svd-seam-in 0.8s 0.12s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
html .svcp__title { color: #fff; }
html .svcp__count { color: var(--svd-edge, #7dadde); }
html .svcp__x { color: #fff; }
html .svcp__x:hover { background: rgba(255, 255, 255, 0.1); }

/* ---- groups ---- */
html .svcp__group--regular {
  border-color: #d6d1c8;
  background: linear-gradient(180deg, rgba(255, 251, 250, 0.78), rgba(241, 237, 234, 0.7));
}
html .svcp__group--regular .svcp__ghead {
  background: var(--svd-face-soft);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 var(--svd-hair);
}
html .svcp__group--regular .svcp__label { color: var(--svd-g800); }
html .svcp__group--regular .svcp__gline { background: linear-gradient(90deg, #aeb1b9, rgba(174, 177, 185, 0)); }

html .svcp__group--onDemand {
  border-color: #aab3c1;
  border-style: dashed;
  background: linear-gradient(180deg, rgba(241, 237, 234, 0.55), rgba(219, 217, 218, 0.4));
}
html .svcp__group--onDemand .svcp__ghead {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 1px, rgba(255, 255, 255, 0) 1px 6px),
    var(--svd-face-steel);
  border-bottom: 0;
}
html .svcp__group--onDemand .svcp__idx,
html .svcp__group--onDemand .svcp__label { color: #fff; }
html .svcp__group--onDemand .svcp__gline { background: linear-gradient(90deg, rgba(229, 255, 255, 0.7), rgba(229, 255, 255, 0)); }
html .svcp__group--onDemand .svcp__chip { color: var(--svd-ice); border-color: rgba(229, 255, 255, 0.7); }
html .svcp__group--onDemand .svcp__node { background: var(--svd-ice); border-color: var(--svd-ice); }

/* group lands as a facet being revealed (first paint only) */
@keyframes svcp-facet {
  from { clip-path: polygon(10px 0, 10px 0, 10px 100%, 0 100%, 0 10px); opacity: 0; }
  to { clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px); opacity: 1; }
}
html .svcp__inner:not(.is-settled) .svcp__group {
  animation: svcp-facet 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--d, 0) * 1ms);
}

/* ---- thumbnails: a lit silver face; one light pass when they land ---- */
html .svcp__thumb-frame {
  background: linear-gradient(135deg, #fffbfa 0%, #aeb1b9 30%, #f1edea 55%, #898c95 100%);
}
html .svcp__group--onDemand .svcp__thumb-frame {
  background: linear-gradient(135deg, #e5ffff 0%, #627b99 35%, #c1bdbe 60%, #485d7c 100%);
}
html .svcp__thumb-img { position: relative; background: #e9e3d8; }
html .svcp__thumb-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 38%, rgba(229, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0) 62%) -140% 0 / 220% 100% no-repeat;
  animation: svd-glint 1.1s 0.5s ease both;
  animation-iteration-count: 1;
  pointer-events: none;
}
html .svcp__inner.is-settled .svcp__thumb-img::after { animation: none; }

/* row: a seam grows on the left when you point at it */
html .svcp__item { position: relative; }
html .svcp__item::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 12%;
  bottom: 12%;
  width: 2px;
  background: var(--svd-seam-line-v);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
html .svcp__item:hover::before,
html .svcp__item:focus-within::before { transform: scaleY(1); }

/* ---- shipping route ---- */
html .svcp__route {
  position: relative;
  background: var(--svd-face-soft);
  box-shadow: inset 0 0 0 1px var(--svd-hair);
}
html .svcp__route::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  width: 56px;
  height: 2px;
  background: var(--svd-seam-line);
}
html .svcp__group--onDemand .svcp__route {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 1px, rgba(255, 255, 255, 0) 1px 6px),
    var(--svd-face-dark);
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--svd-hair-dark);
}
html .svcp__group--onDemand .svcp__route .svcp__status,
html .svcp__group--onDemand .svcp__route .svcp__note,
html .svcp__group--onDemand .svcp__route .svcp__thresh { color: #fff; }
html .svcp__group--onDemand .svcp__route .svcp__note,
html .svcp__group--onDemand .svcp__route .svcp__thresh { color: rgba(255, 255, 255, 0.78); }
html .svcp__cell { background: #c9c4bb; }
html .svcp__group--onDemand .svcp__cell { background: rgba(255, 255, 255, 0.2); }
html .svcp__cell.is-on {
  background: linear-gradient(180deg, #4d8dff, #1d6bff);
  box-shadow: inset 0 1px 0 rgba(229, 255, 255, 0.9);
}

/* ---- foot: second gunmetal face ---- */
html .svcp__foot {
  background: var(--svd-face-deep);
  color: #fff;
}
html .svcp__foot::before { background: var(--svd-seam-line); height: 2px; }
html .svcp__sub { color: #fff; }
html .svcp__duties { color: var(--svd-ice); }
html .svcp__small { color: rgba(255, 255, 255, 0.7); }
html .svcp__link { color: rgba(255, 255, 255, 0.82); }
html .svcp__link:hover { color: #fff; }
html .svcp .svcp__foot :focus-visible { outline-color: var(--svd-ice); }

/* ---- call to action: light passes over the blue face on hover ---- */
html .svcp .svcp__cta { position: relative; overflow: hidden; }
html .svcp .svcp__cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 40%, rgba(229, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 60%) -150% 0 / 220% 100% no-repeat;
  pointer-events: none;
}
html .svcp .svcp__ctawrap:hover .svcp__cta::after { animation: svd-glint 0.9s ease both; }

/* ---- empty state ---- */
html .svcp__empty h3 { color: var(--svd-g800); }

/* ---- motion off ---- */
html[data-sv-motion="calm"] .svcp__top::after,
html[data-sv-motion="calm"] .svcp__thumb-img::after,
html[data-sv-motion="calm"] .svcp__group,
html[data-sv-motion="calm"] .svcp__cta::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  html .svcp__top::after,
  html .svcp__thumb-img::after,
  html .svcp__inner:not(.is-settled) .svcp__group,
  html .svcp .svcp__cta::after,
  html .svcp__item::before { animation: none !important; transition: none !important; }
}

/* Individual / Bundle labels inside Regular */
html .svcp__tier { margin: 12px 0 4px; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--svd-muted, #5f574d); }
html .svcp__tier--bundle { color: var(--svd-seam, #1d6bff); }
html .svcp__bundle { position: relative; padding-left: 10px; box-shadow: inset 2px 0 0 var(--svd-seam, #1d6bff); }
