/* Blixtflow – e-handelns sida. Bygger på ai.css (rubrik, fakta, reglage, steg, frågor) men har egen rörelse:
   orderkortet åker längs en kurva från butiken in i svaret (shop.js räknar ut kurvan och läget),
   en kabel med ström till butiken, en nedräkning och paket som staplas. */

/* ---------- Orderkortet ---------- */
.ecp-order { width: 300px; overflow: hidden; border-radius: 18px; font-size: .86rem; color: var(--ink); background: #fff; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -24px rgba(44, 14, 61, .55); }
.ecp-order__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--ljus); }
.ecp-order__head span { padding: 3px 9px; border-radius: 8px; font-size: .72rem; font-weight: 700; color: var(--ok); background: var(--ok-soft); }
.ecp-order__line, .ecp-order__total { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line-2); }
.ecp-order__line { color: var(--muted); }
.ecp-order__total { font-weight: 800; }
.ecp-order__track { display: flex; align-items: center; gap: 6px; padding: 9px 14px; font-weight: 700; color: var(--primar-ink); border-top: 1px solid var(--line-2); }
.ecp-order__track .ic { width: 15px; height: 15px; }
.ecp-av { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: .72rem; font-weight: 800; color: #fff; background: #BE185D; }

/* ==========================================================================
   1. Hjälten
   ========================================================================== */
.ecp-hero { position: relative; isolation: isolate; overflow: clip; padding: calc(var(--header-h) + env(safe-area-inset-top) + 26px) 0 calc(var(--sheet-r) + 60px); color: #fff; background: var(--natt); }
.ecp-hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .ecp-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.ecp-show { position: relative; height: 520px; }
.ecp-show__disc { position: absolute; left: 50%; top: 52%; width: 420px; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; background: radial-gradient(circle at 40% 35%, rgba(155, 93, 229, .55), rgba(155, 93, 229, .08) 65%, transparent 70%); }
.ecp-show__ring { position: absolute; left: 50%; top: 52%; width: 500px; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; border: 1.5px dashed rgba(200, 168, 242, .3); }
.motion .ecp-show__ring { animation: fx-spin 60s linear infinite; }
.ecp-show__bx { position: absolute; left: 50%; top: 50%; z-index: 2; width: 230px; translate: -50% -50%; }
.motion .ecp-show__bx { animation: chp-rise 1.2s .3s var(--ease-out) backwards; }
.ecp-order--hero { position: absolute; right: 0; top: 4%; z-index: 3; width: 270px; rotate: 4deg; }
.motion .ecp-order--hero { animation: chp-pop .8s 1s var(--spring) backwards, bob 6s 2s ease-in-out infinite; }
.ecp-chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px 8px 8px; border-radius: 16px; font-size: .86rem; font-weight: 700; color: var(--ink); background: #fff; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .7); }
.ecp-chip i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-style: normal; font-weight: 800; color: #fff; background: #7F54B3; }
.ecp-chip em { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: .72rem; font-style: normal; color: var(--ok); background: var(--ok-soft); }
.ecp-chip em .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.ecp-chip--woo { left: 0; top: 18%; }
.ecp-chip--shop { left: 4%; bottom: 14%; }
.ecp-chip--shop i { color: var(--primar-ink); background: var(--soft); }
.ecp-chip--shop em { color: var(--primar-ink); background: var(--soft); }
.ecp-chip--track { right: 8%; bottom: 6%; padding: 10px 14px; color: var(--natt); background: var(--gnista); }
.ecp-chip--track .ic { width: 16px; height: 16px; }
.motion .ecp-chip { animation: chp-pop .7s var(--spring) backwards, bob 5s ease-in-out infinite; }
.motion .ecp-chip--woo { animation-delay: 1.2s, -1s; }
.motion .ecp-chip--shop { animation-delay: 1.4s, -2.4s; }
.motion .ecp-chip--track { animation-delay: 1.6s, -3.6s; }
@media (max-width: 599px) {
  .ecp-show { height: 440px; }
  .ecp-show__disc { width: 320px; } .ecp-show__ring { width: 380px; }
  .ecp-show__bx { width: 180px; }
  .ecp-order--hero { top: auto; bottom: 0; right: -6px; width: 200px; font-size: .72rem; rotate: 3deg; }
  .ecp-order--hero .ecp-order__line:nth-of-type(n + 2) { display: none; }
  .ecp-chip--track { display: none; }
  .ecp-chip--woo { top: 6%; }
  .ecp-chip--shop { bottom: 30%; left: 0; }
  .ecp-show__bx { top: 42%; }
  .ecp-chip { font-size: .78rem; }
}

/* ==========================================================================
   2. Kurvan
   ========================================================================== */
.ecp-path { --p: 1; position: relative; z-index: 1; margin-top: calc(var(--sheet-r) * -1); border-radius: var(--sheet-r) var(--sheet-r) 0 0; background: var(--ljus); }
.ecp-path__sticky { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 22px; padding: clamp(70px, 9vw, 110px) 0 calc(var(--sheet-r) + 50px); }
.ecp-path.is-pinned .ecp-path__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding-top: calc(var(--header-h) + 16px); padding-bottom: 20px; overflow: hidden; }
.ecp-path__head { text-align: center; }
.ecp-stagebox { width: min(100% - 2 * var(--gutter), 1000px); margin-inline: auto; }
.ecp-stage { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 22px 80px; }
.ecp-mail { grid-column: 1; grid-row: 1; padding: 16px 18px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.ecp-mail__from { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.ecp-mail__from .ecp-av { grid-row: span 2; }
.ecp-mail__from small { font-size: .78rem; color: var(--muted); }
.ecp-mail__q { margin-top: 10px; font-size: 1rem; line-height: 1.5; }
.ecp-reply { position: relative; grid-column: 1; grid-row: 2; display: grid; gap: 10px; padding: 16px 18px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--primar), 0 20px 50px -24px rgba(126, 69, 201, .5); }
.ecp-reply__label { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 800; color: var(--primar-ink); }
.ecp-reply__label .ic { width: 15px; height: 15px; }
.ecp-reply__text { font-size: .95rem; line-height: 1.5; }
.ecp-drop { display: block; height: 214px; border-radius: 18px; border: 2px dashed rgba(155, 93, 229, calc(.5 - var(--p) * .5)); background: rgba(155, 93, 229, calc(.06 - var(--p) * .06)); }
.ecp-reply__foot { display: flex; justify-content: flex-end; }
.ecp-reply__foot b { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 11px; font-size: .85rem; color: #fff; background: var(--primar-ink); }
.ecp-reply__foot .ic { width: 15px; height: 15px; }
.ecp-store { position: relative; grid-column: 2; grid-row: 1 / 3; align-self: start; display: grid; gap: 6px; padding: 16px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.ecp-store__head { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; margin-bottom: 6px; }
.ecp-store__logo { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; font-weight: 800; color: #fff; background: #7F54B3; }
.ecp-store__head small { font-size: .78rem; color: var(--muted); }
.ecp-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 13px; border-radius: 13px; font-size: .88rem; box-shadow: inset 0 0 0 1px var(--line-2); }
.ecp-row span { overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.ecp-row em { font-style: normal; font-weight: 700; }
.ecp-row.is-sel { background: var(--soft); box-shadow: inset 0 0 0 1.5px rgba(155, 93, 229, .45); }
.ecp-insert { justify-self: end; display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 10px 15px; border-radius: 12px; font-size: .86rem; font-weight: 700; color: #fff; background: var(--primar-ink); box-shadow: 0 0 0 calc(var(--press, 0) * 8px) rgba(155, 93, 229, .25); }
.ecp-insert .bolt { width: 10px; }
.ecp-order--fly { position: absolute; left: 0; top: 0; z-index: 5; transform: translate(var(--fx, 0px), var(--fy, 0px)) rotate(var(--fr, 0deg)) scale(var(--fs, 1)); will-change: transform; }
.ecp-curve { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ecp-curve path { fill: none; stroke: var(--primar); stroke-width: 2.5; stroke-dasharray: 6 8; opacity: .55; }
.ecp-caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ecp-cap { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); transition: background-color .4s, box-shadow .4s, transform .5s var(--spring), opacity .4s; }
.ecp-cap span { grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-weight: 800; color: var(--primar-ink); background: var(--soft); }
.ecp-cap b { font-size: .95rem; }
.ecp-cap small { font-size: .82rem; line-height: 1.45; color: var(--muted); }
.ecp-path.is-pinned .ecp-cap { opacity: .45; }
.ecp-path.is-pinned .ecp-cap.is-on { opacity: 1; box-shadow: 0 0 0 1.5px var(--primar), var(--shadow-1); transform: translateY(-4px); }
.ecp-cap.is-on span { color: var(--natt); background: var(--gnista); }
@media (max-width: 899px) {
  .ecp-stage { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ecp-mail { grid-row: 1; }
  .ecp-store { grid-column: 1; grid-row: 2; }
  .ecp-reply { grid-row: 3; }
  .ecp-store .ecp-row:nth-of-type(n + 3) { display: none; }
  .ecp-drop { height: 180px; }
  .ecp-order { width: 260px; font-size: .8rem; }
  .ecp-caps { grid-template-columns: minmax(0, 1fr); }
  .ecp-path.is-pinned .ecp-caps { display: block; position: relative; height: 84px; }
  .ecp-path.is-pinned .ecp-cap { position: absolute; inset: 0 var(--gutter); opacity: 0; transform: translateY(10px); }
  .ecp-path.is-pinned .ecp-cap.is-on { opacity: 1; transform: none; }
  .ecp-path__head .h2 { font-size: 1.6rem; }
  .ecp-mail__q, .ecp-reply__text { font-size: .88rem; }
  .ecp-mail, .ecp-reply, .ecp-store { padding: 12px 14px; }
}

/* ==========================================================================
   4. Hitta ordern
   ========================================================================== */
.ecp-find { background: linear-gradient(180deg, var(--natt), #321147); }
.ecp-find__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1000px) { .ecp-find__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; } }
.ecp-find__note { margin-top: 16px; font-size: .85rem; color: var(--ton); }
.ecp-lookup { --focus: var(--gnista); padding: 22px; border-radius: 28px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--on-dark-line), 0 50px 100px -40px rgba(0, 0, 0, .8); }
.ecp-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.ecp-tab { flex: 1; padding: 10px 12px; border: 0; border-radius: 999px; cursor: pointer; font-size: .9rem; font-weight: 700; color: var(--on-dark-2); background: transparent; transition: background-color .3s, color .3s; }
.ecp-tab[aria-pressed="true"] { color: var(--natt); background: var(--gnista); }
.ecp-search { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 6px 6px 6px 16px; border-radius: 18px; background: #fff; }
.ecp-search span .ic { width: 20px; height: 20px; color: var(--muted); }
.ecp-search input { flex: 1; width: 0; min-width: 0; height: 44px; border: 0; font-size: 1rem; color: var(--ink); background: transparent; }
.ecp-search input:focus { outline: none; }
.ecp-search:focus-within { box-shadow: 0 0 0 4px rgba(242, 250, 163, .5); }
.ecp-found { margin: 18px 4px 10px; font-size: .88rem; font-weight: 650; color: var(--gnista); }
.ecp-results { display: grid; gap: 8px; }
.ecp-results li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 15px; border-radius: 16px; color: var(--ink); background: #fff; }
.ecp-results li:first-child { box-shadow: inset 0 0 0 2px var(--primar); }
.ecp-results__ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--primar-ink); background: var(--soft); }
.ecp-results__ic .ic { width: 17px; height: 17px; }
.ecp-results span:not(.ecp-results__ic) { overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.ecp-results em { font-style: normal; font-weight: 800; }
.ecp-results.is-run li { animation: ecp-in .55s var(--spring) both; animation-delay: calc(.1s + var(--i) * .12s); }
.ecp-results.is-busy li { opacity: .25; filter: blur(2px); transition: opacity .2s, filter .2s; }
.ecp-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: .88rem; font-weight: 700; color: var(--ton); }
.ecp-all .ic { width: 16px; height: 16px; transform: rotate(-90deg); }

/* ==========================================================================
   5. Kabeln
   ========================================================================== */
.ecp-plug { padding-bottom: clamp(40px, 6vw, 70px); }
.ecp-cable { display: grid; grid-template-columns: auto minmax(40px, 1fr) auto minmax(40px, 1fr) auto; align-items: center; max-width: 1000px; margin-inline: auto; }
.ecp-node, .ecp-hub { display: grid; justify-items: center; gap: 8px; padding: 22px; border-radius: 26px; text-align: center; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-2); }
.ecp-node span { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; font-size: 1.5rem; font-weight: 800; color: #fff; background: #7F54B3; }
.ecp-node--shop span { color: var(--primar-ink); background: var(--soft); }
.ecp-node em { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-style: normal; font-weight: 700; color: var(--ok); background: var(--ok-soft); }
.ecp-node--shop em { color: var(--primar-ink); background: var(--soft); }
.ecp-node em .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.ecp-hub { padding: 26px 30px; color: #fff; background: radial-gradient(120% 120% at 100% 0%, #5b2a80, var(--natt) 65%); box-shadow: 0 0 0 10px rgba(155, 93, 229, .12), var(--shadow-3); }
.ecp-hub img { width: 54px; height: 54px; padding: 8px; border-radius: 16px; background: #fff; }
.ecp-wire { width: 100%; height: 120px; overflow: visible; }
.ecp-wire path { fill: none; stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ecp-wire--a path { stroke: var(--primar); }
.ecp-wire--a circle { fill: var(--gnista); filter: drop-shadow(0 0 6px rgba(242, 250, 163, .9)); }
.ecp-wire--b path { stroke: #CDBDE0; stroke-dasharray: 2 10; }
.motion .ecp-wire--b path { animation: dash 1.4s linear infinite; }
.reveal-on .ecp-cable .ecp-wire--a path { stroke-dasharray: 400; stroke-dashoffset: 400; }
.reveal-on .ecp-cable.is-in .ecp-wire--a path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s .3s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .ecp-wire circle { display: none; } }
.ecp-multi { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 30px; font-weight: 700; color: var(--primar-ink); }
.ecp-multi .ic { width: 20px; height: 20px; }
@media (max-width: 699px) {
  .ecp-cable { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; }
  .ecp-wire { width: 120px; height: 70px; rotate: 90deg; }
}

/* ==========================================================================
   6. Integritet
   ========================================================================== */
.ecp-priv { padding-top: clamp(40px, 6vw, 70px); padding-bottom: calc(clamp(76px, 10vw, 136px) + var(--sheet-r)); }
.ecp-priv__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1000px) { .ecp-priv__grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.ecp-vault { display: grid; gap: 18px; justify-items: center; padding: 30px 24px; border-radius: 32px; color: #fff; background: radial-gradient(120% 100% at 100% 0%, #5b2a80, var(--natt) 60%); box-shadow: var(--shadow-3); }
.ecp-timer { --t: 1; position: relative; width: 220px; aspect-ratio: 1; }
.ecp-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ecp-timer circle { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 8; }
.ecp-timer .ecp-timer__arc { stroke: var(--gnista); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--t) * 100); transition: stroke-dashoffset 1s linear; filter: drop-shadow(0 0 8px rgba(242, 250, 163, .5)); }
.ecp-timer p { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; }
.ecp-timer__lock .ic { width: 22px; height: 22px; color: var(--gnista); }
.ecp-timer b { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ecp-timer small { max-width: 130px; font-size: .74rem; line-height: 1.3; color: var(--ton); }
.ecp-log { width: 100%; padding: 16px; border-radius: 20px; color: var(--ink); background: #fff; }
.ecp-log__h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--primar-ink); }
.ecp-log__h .ic { width: 16px; height: 16px; }
.ecp-log ul { display: grid; gap: 6px; }
.ecp-log li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; font-size: .85rem; background: var(--ljus); }
.ecp-log li .ecp-av { width: 28px; height: 28px; font-size: .62rem; background: var(--primar-ink); }
.ecp-log small { font-size: .75rem; color: var(--muted); }
.reveal-on .ecp-vault .ecp-log li { opacity: 0; transform: translateY(10px); }
.reveal-on .ecp-vault.is-in .ecp-log li { opacity: 1; transform: none; transition: opacity .4s, transform .6s var(--spring); transition-delay: calc(.5s + var(--i) * .5s); }

/* ==========================================================================
   7. Kalkylatorn – paketen
   ========================================================================== */
.ecp-save { padding-bottom: calc(clamp(76px, 10vw, 136px) + var(--sheet-r)); background: linear-gradient(180deg, var(--natt), #321147); }
.ecp-calc { display: grid; overflow: hidden; border-radius: 32px; background: #fff; color: var(--ink); box-shadow: var(--shadow-3); }
.ecp-calc__in { display: grid; align-content: center; gap: 24px; padding: 28px 24px; }
.ecp-calc__out { display: grid; justify-items: center; gap: 10px; padding: 28px 24px; color: #fff; background: radial-gradient(120% 90% at 100% 0%, #4d1f6c, var(--natt) 62%); }
.ecp-boxes { display: flex; flex-wrap: wrap-reverse; justify-content: center; align-content: flex-start; gap: 6px; width: 100%; max-width: 330px; height: 180px; }
.ecp-boxes i { position: relative; width: 36px; height: 30px; border-radius: 5px; background: linear-gradient(180deg, #D8B48A, #B98A5B); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); opacity: 0; transform: translateY(-40px) scale(.6); transition: opacity .3s, transform .5s var(--spring); transition-delay: calc(var(--i) * 18ms); }
.ecp-boxes i::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: rgba(242, 250, 163, .8); }
.ecp-boxes i.is-on { opacity: 1; transform: none; }
.ecp-calc__big { display: grid; justify-items: center; gap: 2px; margin-top: 6px; }
.ecp-calc__big b { font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--gnista); font-variant-numeric: tabular-nums; }
.ecp-calc__big span { font-size: .9rem; color: var(--ton); }
.ecp-calc__small { font-size: .9rem; color: var(--on-dark-2); }
.ecp-calc__small b { color: #fff; }
@media (min-width: 900px) { .ecp-calc { grid-template-columns: 1fr 1fr; } .ecp-calc__in, .ecp-calc__out { padding: 40px 38px; } }
.ecp-howto { margin-top: clamp(64px, 8vw, 104px); }

@keyframes ecp-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
