/* The Unknown Merchant: home and service page showcase styles.
   Loaded after site.css. Applies the profile page's design principles site-wide:
   coloured cards with icons, animated sequences, compact phones, no dead space. */

/* ---------- Home hero: a faint live dashboard behind the mascot ---------- */
.hero-visual { position: relative; justify-self: end; width: 100%; max-width: 560px; display: grid; place-items: end end; }
.hero-visual .hero-portrait { position: relative; z-index: 2; max-width: 330px; margin-right: -10px; }
.hero-dash { position: absolute; z-index: 1; inset: 2% 0 14% -6%; border-radius: 16px; padding: 14px; display: grid; gap: 10px; align-content: start;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); opacity: .62;
  transform: perspective(1000px) rotateY(-10deg) rotateX(3deg); transform-origin: 80% 50%;
  -webkit-mask-image: radial-gradient(130% 120% at 60% 40%, #000 55%, transparent 100%); mask-image: radial-gradient(130% 120% at 60% 40%, #000 55%, transparent 100%);
  font: 400 12px/1.3 var(--font-body); color: #D6D3E3; pointer-events: none; }
.hd-top { display: flex; align-items: center; gap: 5px; }
.hd-top i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.3); }
.hd-top b { margin-left: 8px; font-weight: 600; color: #fff; }
.hd-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hd-kpis div { background: rgba(255,255,255,.07); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; }
.hd-kpis span { font-size: 10.5px; color: #B9B5CC; }
.hd-kpis b { font-size: 17px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.hd-chart { height: 110px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; align-items: end; padding: 8px; background: rgba(255,255,255,.05); border-radius: 8px; }
.hd-chart i { display: block; height: var(--h); background: rgba(185,181,204,.45); border-radius: 3px 3px 0 0; transform-origin: bottom; }
.hd-chart i.now { background: var(--lantern-gold); }
.hd-rows { display: grid; gap: 6px; padding: 8px 10px; background: rgba(255,255,255,.05); border-radius: 8px; }
.hd-rows div { display: grid; grid-template-columns: 58px 1fr 52px; gap: 8px; align-items: center; }
.hd-rows s { display: block; height: 6px; width: var(--w); background: rgba(244,185,66,.7); border-radius: 3px; }
.hd-rows b { text-align: right; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .hd-chart i { animation: hdBar 3.2s ease-in-out infinite alternate; }
  .hd-chart i:nth-child(odd) { animation-delay: -1.1s; } .hd-chart i:nth-child(3n) { animation-delay: -2.2s; }
  .hd-rows s { animation: hdRow 4s ease-in-out infinite alternate; }
  .hd-rows div:nth-child(2) s { animation-delay: -1.3s; } .hd-rows div:nth-child(3) s { animation-delay: -2.6s; }
}
@keyframes hdBar { from { transform: scaleY(.82); } to { transform: scaleY(1); } }
@keyframes hdRow { from { transform: scaleX(.88); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }

/* ---------- Home pain points: each problem beside a preview of it solved ---------- */
.ps-list { display: grid; gap: 18px; }
.ps-row { display: grid; grid-template-columns: 1fr 1.05fr; gap: 0; background: #fff; border: 1px solid var(--fog-deep); border-radius: var(--radius-large); overflow: hidden; }
.ps-pain { padding: 24px 26px; border-top: 4px solid var(--wax-red); }
.ps-pain h3 { margin: 12px 0 8px; font-size: 1.45rem; }
.ps-bullets { list-style: none; display: grid; gap: 8px; }
.ps-bullets li { position: relative; padding-left: 20px; color: #3E4258; }
.ps-bullets li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--wax-red); }
.ps-fix { background: var(--twilight); color: var(--fog); padding: 18px 22px 22px; display: grid; align-content: start; gap: 12px; }
.ps-label { margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 600; color: #E1EFEC; }
.ps-label a { color: var(--lantern-gold); }
.ps-check { width: 22px; height: 22px; border-radius: 50%; background: var(--verdigris); position: relative; flex: none; }
.ps-check::after { content: ""; position: absolute; left: 7px; top: 4px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mini { background: #fff; color: var(--night-ink); border-radius: 12px; padding: 14px; display: grid; gap: 8px; font-size: .95rem; box-shadow: 0 14px 30px rgba(6,8,26,.25); }
.mini-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mini-head b { font-weight: 600; }
.mini-head span { font-size: .85rem; color: #5A5E75; }
.mi-locs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mi-locs span { display: flex; justify-content: space-between; background: #F2F4F6; border-radius: 6px; padding: 6px 9px; font-size: .88rem; }
.mi-locs b { font-variant-numeric: tabular-nums; }
.mi-event { justify-self: start; background: #FBEAEC; color: #7D1B2E; border-radius: 999px; padding: 3px 12px; font-size: .85rem; font-weight: 600; }
.mi-sync { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 6px 2px; border-bottom: 1px solid #EEF0F3; font-size: .9rem; }
.mi-sync b { font-variant-numeric: tabular-nums; }
.mi-sync em { font-style: normal; font-weight: 600; color: var(--verdigris); font-size: .85rem; }
.mp-row { display: grid; grid-template-columns: 92px 1fr 72px; gap: 10px; align-items: center; font-size: .9rem; }
.mp-row s { display: block; height: 10px; width: var(--w); background: var(--twilight); border-radius: 3px; transform-origin: left; }
.mp-row.cost s { background: #C7A07A; }
.mp-row.profit { border-top: 1px solid #EEF0F3; padding-top: 8px; font-weight: 600; }
.mp-row.profit s { background: var(--verdigris); }
.mp-row b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.mp-best { display: flex; justify-content: space-between; gap: 10px; background: #E1EFEC; border-radius: 8px; padding: 8px 10px; font-size: .88rem; }
.mp-best b { color: var(--verdigris); font-weight: 600; }
.md-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.md-kpis div { background: #F2F4F6; border-radius: 8px; padding: 8px 10px; display: grid; }
.md-kpis span { font-size: .78rem; color: #5A5E75; }
.md-kpis b { font-weight: 600; font-variant-numeric: tabular-nums; }
.md-warn { background: #FFF4DC; border-left: 3px solid #C9A04A; border-radius: 0 8px 8px 0; padding: 7px 10px; display: grid; font-size: .85rem; }
.md-warn span { font-weight: 600; color: #6B4E0C; }
.md-warn em { font-style: normal; color: #5C4A12; }
.md-pace { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: .85rem; }
.md-pace i { display: block; height: 8px; background: #EEF0F3; border-radius: 4px; overflow: hidden; }
.md-pace s { display: block; height: 100%; width: var(--w); background: var(--verdigris); border-radius: 4px; transform-origin: left; }
.md-pace b { color: var(--verdigris); font-weight: 600; }
.md-year { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: .85rem; }
.md-year svg { width: 100%; height: 28px; }
.md-year polyline { fill: none; stroke: var(--lantern-gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 200; stroke-dashoffset: 0; }
.md-year b { font-weight: 600; }
.sample-note { margin: 10px 0 0; font-size: .85rem; color: #5A5E75; }

/* Previews come alive when their row scrolls in */
.js-motion .ps-row .mi-sync, .js-motion .ps-row .mi-event { opacity: 0; transform: translateX(-10px); }
.js-motion .ps-row.is-in .mi-event { animation: psIn .4s .5s both; }
.js-motion .ps-row.is-in .mi-sync { animation: psIn .4s both; }
.js-motion .ps-row.is-in .mi-sync:nth-of-type(1) { animation-delay: .9s; }
.js-motion .ps-row.is-in .mi-sync:nth-of-type(2) { animation-delay: 1.1s; }
.js-motion .ps-row.is-in .mi-sync:nth-of-type(3) { animation-delay: 1.3s; }
.js-motion .ps-row .mp-row s, .js-motion .ps-row .md-pace s { transform: scaleX(0); transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.js-motion .ps-row.is-in .mp-row s, .js-motion .ps-row.is-in .md-pace s { transform: scaleX(1); }
.js-motion .ps-row.is-in .mp-row:nth-child(3) s { transition-delay: .15s; } .js-motion .ps-row.is-in .mp-row:nth-child(4) s { transition-delay: .3s; }
.js-motion .ps-row.is-in .mp-row:nth-child(5) s { transition-delay: .45s; } .js-motion .ps-row.is-in .mp-row:nth-child(6) s { transition-delay: .7s; }
.js-motion .ps-row .md-year polyline { stroke-dashoffset: 200; }
.js-motion .ps-row.is-in .md-year polyline { transition: stroke-dashoffset 1.4s .4s ease-out; stroke-dashoffset: 0; }
@keyframes psIn { to { opacity: 1; transform: none; } }

/* ---------- Site-wide: the profile's design principles ---------- */
/* How we work: a connected sequence that fills in */
.steps { position: relative; }
.steps::before { content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 2px; background: var(--fog-deep); }
.steps::after { content: ""; position: absolute; left: 22px; top: 22px; height: 2px; width: calc(100% - 44px); background: var(--lantern-gold); transform: scaleX(0); transform-origin: left; transition: transform 1.6s cubic-bezier(.4,0,.2,1) .2s; }
.steps li { position: relative; z-index: 1; background: #fff; border: 1px solid var(--fog-deep); border-radius: var(--radius-large); padding: 0 18px 18px; }
.steps li::before { margin: -1px 0 14px; position: relative; top: 0; }
.process .steps li { background: #F2F4F6; border: 0; padding: 0; }
.steps.lit::after, .no-js-motion .steps::after { transform: scaleX(1); }

/* Safeguards: tinted tiles */
.guards > div { background: #fff; border: 1px solid var(--fog-deep); border-radius: var(--radius-large); padding: 16px 18px; }
.guards > div:nth-child(3n+1) { background: #E1EFEC; border-color: transparent; }
.guards > div:nth-child(3n+2) { background: #F2E6D6; border-color: transparent; }
.guards > div:nth-child(3n+3) { background: var(--mist); border-color: transparent; }
.guards .ico.gain { background: #fff; }

/* Examples from CentralOps: glass cards on twilight */
.example-grid article { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-left: 3px solid var(--lantern-gold); border-radius: 0 var(--radius-large) var(--radius-large) 0; padding: 16px 18px; }
.achievements .example-grid article { background: #fff; border-color: var(--fog-deep); border-left-color: var(--kraft); }

/* Advantages: coloured tiles with their icons */
.advantages .gain-list.wide li { border-radius: var(--radius-large); padding: 14px 16px; background: #E1EFEC; }
.advantages .gain-list.wide li:nth-child(2) { background: #F2E6D6; }
.advantages .gain-list.wide li:nth-child(3) { background: var(--mist); }
.advantages .gain-list.wide li:nth-child(4) { background: #FFF4DC; }
.advantages .gain-list.wide .ico.gain { background: #fff; }

/* Service-page problems: compact cards with the icon beside the title */
.pain-grid article, .cost-grid article { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; padding: 18px 20px; }
.pain-grid article .ico, .cost-grid article .ico { margin: 0; }
.pain-grid article h3, .cost-grid article h3 { margin: 0; }
.pain-grid article p, .cost-grid article p { grid-column: 1 / -1; margin-top: 10px; }

/* Offer cards on the home page: lift on hover */
.offer-card { transition: background-color .15s ease, transform .2s ease; }
.offer-card:hover { transform: translateY(-3px); }

/* ---------- Tablet and phone ---------- */
@media (max-width: 980px) {
  .ps-row { grid-template-columns: 1fr; }
  .steps::before, .steps::after { display: none; }
}
@media (max-width: 860px) {
  .hero-visual { justify-self: center; max-width: 340px; order: -1; margin-bottom: 4px; }
  .hero-visual .hero-portrait { max-width: 210px; }
  .hero-dash { inset: 0 -4% 14% -4%; padding: 10px; gap: 7px; opacity: .5; transform: none; }
  .hd-kpis b { font-size: 14px; }
  .hd-chart { height: 56px; }
  .hd-rows { display: none; }
  .ps-pain { padding: 18px 18px 16px; }
  .ps-fix { padding: 16px; }
  .mp-row { grid-template-columns: 78px 1fr 64px; }
  .guards > div, .advantages .gain-list.wide li { padding: 14px; }
  .steps li { padding: 0 14px 14px; }
}
@media (max-width: 520px) {
  .mi-locs span { padding: 5px 8px; font-size: .82rem; }
  .md-kpis b { font-size: .9rem; }
}

/* ---------- Service pages ---------- */
/* Hero: the mascot in front of a faint screen for that service */
.page-hero .hero-visual.svc { justify-self: center; align-self: end; max-width: 440px; place-items: end center; }
.page-hero .hero-visual.svc .page-hero-figure { position: relative; z-index: 2; max-width: 260px; margin: 0; }
.page-hero .hero-visual.svc .hero-dash { inset: 4% -8% 22% -14%; }
.hd-chat { gap: 8px; }
.hd-q { margin: 0; justify-self: end; max-width: 85%; background: rgba(244,185,66,.22); color: #fff; border-radius: 12px 12px 3px 12px; padding: 7px 11px; font-size: 12px; }
.hd-a { background: rgba(255,255,255,.08); border-radius: 12px 12px 12px 3px; padding: 8px 10px; display: grid; gap: 6px; }
.hd-a .hd-rows { background: none; padding: 0; }

/* Shared mini-preview pieces */
.mini-total { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #EEF0F3; padding-top: 8px; font-size: .9rem; }
.mini-total b { font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-verdict { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-radius: 8px; padding: 8px 10px; font-size: .9rem; }
.mini-verdict.good { background: #E1EFEC; color: #1F5B50; }
.mini-verdict b { font-weight: 700; }
.mi-sync em.warn { color: #8A5E0C; }
.mi-sync em.muted { color: #6A6E85; }
.pill { justify-self: start; border-radius: 999px; padding: 1px 10px; font-size: .8rem; font-weight: 600; }
.pill.on { background: #E1EFEC; color: var(--verdigris); }
.pill.test { background: #FFF4DC; color: #8A5E0C; }
.pill.est { background: #FFF4DC; color: #8A5E0C; }
.pill.final { background: #E1EFEC; color: var(--verdigris); }
.hidden-amt { letter-spacing: .1em; color: #5A5E75; }
.mini-chat { gap: 10px; }
.mini-chat .bub { margin: 0; padding: 10px 13px; border-radius: 14px; max-width: 92%; font-size: .92rem; }
.mini-chat .bub.you { justify-self: end; background: var(--twilight); color: #fff; border-bottom-right-radius: 4px; }
.mini-chat .bub.them { background: #F2F4F6; border-bottom-left-radius: 4px; display: grid; gap: 8px; }

/* "Without it" on service pages uses the home page's problem-and-fix rows */
.pains .ps-list { margin-top: 8px; }

/* What you get: a guided tour. Tap a feature and the preview beside it changes. */
.tour-hint { margin: -6px 0 18px; color: #5A5E75; }
.tour { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.tour-list { list-style: none; display: grid; gap: 8px; }
.tour-item { width: 100%; text-align: left; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; position: relative; overflow: hidden;
  background: #fff; border: 1.5px solid var(--fog-deep); border-radius: var(--radius-large); padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; transition: border-color .2s, background .2s; }
.tour-item:hover { border-color: #AEB4C2; }
.tour-item[aria-selected="true"] { border-color: var(--twilight); background: #F7F8FB; }
.tour-text { display: grid; gap: 2px; }
.tour-text b { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; line-height: 1.25; }
.tour-text > span { color: #3E4258; font-size: .95rem; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s, opacity .4s; }
.tour-item[aria-selected="true"] .tour-text > span { max-height: 8em; opacity: 1; }
.tour-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--lantern-gold); transform: scaleX(0); transform-origin: left; }
.tour.playing .tour-item[aria-selected="true"] .tour-progress { animation: tourBar var(--tour-ms, 5200ms) linear forwards; }
@keyframes tourBar { to { transform: scaleX(1); } }
.tour-stage { position: sticky; top: 96px; background: var(--twilight); border-radius: var(--radius-large); padding: 22px; min-height: 340px; display: grid; align-content: center; }
.tour-panel { animation: panelIn .45s cubic-bezier(.2,.7,.2,1) both; }
.tour-panel .mini { box-shadow: 0 16px 34px rgba(6,8,26,.35); }
.tour-stage .sample-note { color: #9D98B3; margin: 12px 0 0; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
/* Bars in tour panels draw in each time a panel opens */
.tour-panel .mp-row s, .tour-panel .md-pace s { animation: barIn .8s cubic-bezier(.2,.7,.2,1) both; transform-origin: left; }
.tour-panel .mi-sync, .tour-panel .mi-event, .tour-panel .md-warn { animation: psIn .4s both; }
.tour-panel .mi-sync:nth-of-type(2), .tour-panel .md-warn:nth-of-type(2) { animation-delay: .12s; }
.tour-panel .mi-sync:nth-of-type(3), .tour-panel .md-warn:nth-of-type(3) { animation-delay: .24s; }
.tour-panel .mi-sync:nth-of-type(4) { animation-delay: .36s; }
@keyframes barIn { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .tour-panel, .tour-panel * { animation: none !important; } }

/* Calculators */
.calc-section { background: var(--mist); }
.calc-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: start; }
.calc-note { font-size: .9rem; color: #5A5E75; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: #fff; border-radius: var(--radius-large); overflow: hidden; box-shadow: 0 18px 40px rgba(22,26,51,.1); }
.calc-fields { padding: 20px; display: grid; gap: 12px; align-content: start; }
.calc-fields label { display: grid; gap: 5px; font-size: .9rem; font-weight: 500; }
.calc-fields input, .calc-fields select { width: 100%; font: inherit; font-size: 1rem; background: #F7F8FA; border: 1.5px solid var(--fog-deep); border-radius: var(--radius-small); padding: 9px 11px; min-height: 44px; color: inherit; }
.calc-fields input:focus, .calc-fields select:focus { outline: none; border-color: var(--twilight); box-shadow: 0 0 0 3px rgba(244,185,66,.45); }
.calc-fields .money, .calc-fields .pct { position: relative; display: block; }
.calc-fields .money input { padding-left: 24px; }
.calc-fields .money::before { content: "$"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #5A5E75; }
.calc-fields .pct input { padding-right: 28px; }
.calc-fields .pct::after { content: "%"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: #5A5E75; }
.calc-result { background: var(--twilight); color: var(--fog); padding: 20px; display: grid; gap: 10px; align-content: start; }
.cr-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 8px; }
.cr-row b { font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.cr-row span b { font-weight: 500; color: inherit; }
.cr-row.big b { font-family: var(--font-display); font-weight: 400; font-size: 2rem; color: var(--lantern-gold); }
.cr-verdict { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; font-weight: 600; background: rgba(255,255,255,.08); }
.cr-verdict.good { background: rgba(95,190,160,.2); color: #BFEBDD; }
.cr-verdict.thin { background: rgba(244,185,66,.2); color: #FFE3A3; }
.cr-verdict.bad { background: rgba(224,96,120,.22); color: #FFC7D2; }
.cw-row { display: grid; grid-template-columns: 112px 1fr 84px; gap: 10px; align-items: center; font-size: .92rem; }
.cw-row s { display: block; height: 12px; width: var(--w, 0%); background: #B9B5CC; border-radius: 3px; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.cw-row.cost s { background: #C7A07A; }
.cw-row.total { border-top: 1px solid rgba(255,255,255,.14); padding-top: 10px; font-weight: 600; }
.cw-row.total s { background: var(--lantern-gold); }
.cw-row.total.neg s { background: #E06078; }
.cw-row b { text-align: right; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }

@media (max-width: 980px) {
  .tour { grid-template-columns: 1fr; }
  .tour-stage { position: relative; top: 0; min-height: 0; order: -1; }
  .calc-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 860px) {
  .page-hero .hero-visual.svc { max-width: 300px; margin: 0 auto; }
  .page-hero .hero-visual.svc .page-hero-figure { max-width: 190px; }
  .page-hero .hero-visual.svc .hero-dash { inset: 0 -6% 20% -6%; }
  .tour-stage { padding: 14px; }
  .tour-item { padding: 10px 12px; }
  .calc { grid-template-columns: 1fr; }
  .calc-fields { grid-template-columns: 1fr 1fr; padding: 16px; }
  .calc-fields label:has(select) { grid-column: 1 / -1; }
  .cw-row { grid-template-columns: 96px 1fr 70px; }
}
