/* ==========================================================================
   widgets.css — interactive presentation widgets for the HomeCV home page.
   Loads AFTER home.css. Home page only.
   1 · Tabbed Product feature switcher
   2 · Hero live-activity toast + presence cluster
   3 · Ecosystem / logo cloud
   4 · Scroll-pinned "How Passpo works"
   5 · Segmented stakeholder gallery
   ========================================================================== */

/* ── shared mock surfaces ─────────────────────────────────────────────── */
.mock {
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 30px 70px -44px rgba(36,30,22,0.5); overflow: hidden;
}
.mock-bar {
  display: flex; align-items: center; gap: 9px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.mock-bar .dots { display: flex; gap: 5px; }
.mock-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.mock-bar .mock-url { font-family: var(--mono); font-size: 10.5px; color: var(--brown-4); letter-spacing: .02em; }
.mock-body { padding: 18px; }
.mock-title { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.mock-title i { font-size: 19px; color: var(--accent); }
.mock-title b { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--brown); }

.mrow { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.mrow + .mrow { margin-top: 9px; }
.mrow-ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-size: 17px; flex: 0 0 auto; }
.mrow-tx { flex: 1 1 auto; min-width: 0; }
.mrow-tx b { font-size: 13px; color: var(--brown); font-weight: 600; display: block; line-height: 1.25; }
.mrow-tx small { font-size: 11.5px; color: var(--brown-4); }
.m-badge { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 100px; white-space: nowrap; flex: 0 0 auto; }
.m-badge.on { color: var(--success); background: rgba(93,122,61,0.12); }
.m-badge.prog { color: var(--warn); background: rgba(184,132,42,0.14); }
.m-badge.muted { color: var(--brown-4); background: var(--surface-2); }

/* ── 1 · Tabbed Product switcher ──────────────────────────────────────── */
.tabswitch { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 28px; margin-top: 46px; align-items: start; }
.ts-list { display: flex; flex-direction: column; gap: 8px; }
.ts-tab {
  display: flex; gap: 13px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px;
  cursor: pointer; transition: border-color .16s, background .16s; position: relative;
}
.ts-tab:hover { border-color: var(--line-strong); }
.ts-tab.active { border-color: var(--accent); background: rgba(23,95,100,0.04); box-shadow: inset 3px 0 0 var(--accent); }
.ts-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-size: 21px; transition: background .16s, color .16s; }
.ts-tab.active .ts-ic { background: var(--accent); color: #f3efe3; }
.ts-tx b { display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--brown); }
.ts-tx span { display: block; font-size: 12px; color: var(--brown-4); margin-top: 2px; line-height: 1.45; }
.ts-stage { position: relative; }
.ts-panel { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease, visibility .3s; }
.ts-panel.active { opacity: 1; visibility: visible; transform: none; position: relative; }
.ts-chat { display: flex; flex-direction: column; gap: 10px; }
.ts-bub { max-width: 86%; padding: 11px 14px; border-radius: 13px; font-size: 13px; line-height: 1.45; }
.ts-bub.q { align-self: flex-end; background: var(--accent); color: #f3efe3; border-bottom-right-radius: 4px; }
.ts-bub.a { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); color: var(--brown-2); border-bottom-left-radius: 4px; }
.ts-bub.a b { color: var(--brown); }
.ts-bub.note { align-self: center; max-width: 100%; display: flex; align-items: center; gap: 7px; background: transparent; color: var(--brown-2); font-size: 12px; font-family: var(--mono); padding: 4px 0 0; opacity: .8; }
.ts-bub.note i { color: var(--accent); }
.ts-linkfield { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 12px; font-family: var(--mono); font-size: 12px; color: var(--brown-3); }
.ts-linkfield i { color: var(--accent); }
.ts-linkfield .copy { margin-left: auto; font-family: var(--sans); font-size: 11.5px; font-weight: 600; color: var(--accent); }
.ts-pdf { display: flex; gap: 14px; align-items: stretch; }
.ts-pdf-cover { flex: 0 0 auto; width: 96px; border: 1px solid var(--line-strong); border-radius: 8px; background: linear-gradient(160deg, var(--accent), #06312e); color: #f5f2e7; padding: 14px 12px; display: flex; flex-direction: column; }
.ts-pdf-cover .pc-k { font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); }
.ts-pdf-cover .pc-t { font-family: var(--serif); font-size: 17px; line-height: 1.05; margin-top: 6px; }
.ts-pdf-cover .pc-f { margin-top: auto; font-size: 8px; font-family: var(--mono); color: rgba(245,242,231,.6); }

/* ── 2 · Hero live-activity + presence ────────────────────────────────── */
.hero-presence {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,0.92); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  border: 1px solid var(--line); border-radius: 100px; padding: 5px 13px 5px 6px;
  box-shadow: 0 10px 26px -14px rgba(36,30,22,0.5);
}
.hp-avatars { display: flex; }
.hp-avatars span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px; display: grid; place-items: center; font-size: 9.5px; font-weight: 700; color: #fff; }
.hp-avatars span:first-child { margin-left: 0; }
.hero-presence .pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(93,122,61,0.18); }
.hero-presence b { font-size: 11.5px; color: var(--brown-2); font-weight: 600; }
.hero-toast {
  position: absolute; left: 14px; bottom: 14px; z-index: 3; width: 244px;
  display: flex; gap: 11px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px;
  box-shadow: 0 18px 40px -20px rgba(36,30,22,0.55);
}
.hero-toast .ht-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(23,95,100,0.1); color: var(--accent); font-size: 17px; flex: 0 0 auto; }
.hero-toast b { font-size: 12px; color: var(--brown); font-weight: 600; display: block; line-height: 1.3; }
.hero-toast small { font-size: 10.5px; color: var(--brown-4); }
@media (prefers-reduced-motion: no-preference) {
  .hero-toast.swap { animation: toastIn .45s cubic-bezier(.16,.84,.34,1) both; }
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

/* ── 3 · Ecosystem / logo cloud ───────────────────────────────────────── */
.cloud { padding: 36px 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.cloud .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cloud-lab { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--brown-2); font-weight: 700; text-align: center; }
.cloud-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 32px; }
.cloud-item { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--brown-2); opacity: 1; transition: color .16s; }
.cloud-item:hover { color: var(--accent); }
.cloud-item i { font-size: 19px; color: var(--accent); }

/* ── 4 · How it works — three self-contained step cards ───────────────── */
.how3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 46px; }
.how-step { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .16s, transform .16s, box-shadow .16s; }
.how-step:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 26px 50px -34px rgba(36,30,22,.5); }
.how-top { padding: 26px 26px 20px; }
.how-num { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 19px; color: #f5f2e7; background: radial-gradient(circle at 50% 36%, #237b80, #175f64 72%); box-shadow: 0 6px 16px -8px rgba(23,95,100,.55); margin-bottom: 16px; }
.how-step h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 8px; color: var(--brown); }
.how-step > .how-top > p { font-size: 16px; line-height: 1.55; color: var(--brown-3); margin: 0; text-wrap: pretty; }
.how-reward { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; font-weight: 500; color: var(--success); }
.how-reward i { font-size: 16px; }
.how-media { margin-top: auto; padding: 16px; border-top: 1px solid var(--line); background: var(--surface); }
.how-cap { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; color: var(--brown-4); letter-spacing: .03em; margin-bottom: 11px; padding: 0 2px; }
.how-cap i { font-size: 13px; color: var(--accent); }
@media (max-width: 1000px) { .how3 { grid-template-columns: 1fr; } }

/* ── 4b · (legacy) Scroll-pinned plan — no longer used ────────────────── */
.pin { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 8px; align-items: start; }
.pin-media { position: sticky; top: calc(50vh - 215px); height: 430px; }
.pin-vis { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: translateY(10px) scale(.99); transition: opacity .45s ease, transform .45s ease, visibility .45s; }
.pin-vis.active { opacity: 1; visibility: visible; transform: none; }
.pin-steps { display: flex; flex-direction: column; }
.pin-step { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; opacity: .35; transition: opacity .35s ease; }
.pin-step.active { opacity: 1; }
.pin-step .pin-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 20px; color: #f5f2e7; background: radial-gradient(circle at 50% 36%, #237b80, #175f64 72%); box-shadow: 0 6px 16px -8px rgba(23,95,100,.6); margin-bottom: 18px; }
.pin-step h3 { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); font-weight: 600; margin: 0 0 12px; color: var(--brown); }
.pin-step p { font-size: 16px; line-height: 1.6; color: var(--brown-3); margin: 0; max-width: 42ch; text-wrap: pretty; }
.pin-step .pin-reward { display: inline-flex; align-items: center; gap: 9px; margin-top: 20px; font-size: 14px; font-weight: 500; color: var(--success); }
.pin-step .pin-reward i { font-size: 17px; }
/* progress rail */
.pin-rail { position: sticky; top: 104px; }

/* ── 5 · Segmented stakeholder gallery ────────────────────────────────── */
.seg { margin-top: 46px; }
.seg-head { display: flex; justify-content: center; }
.seg-tabs { display: inline-flex; gap: 4px; padding: 5px; background: var(--surface-2); border-radius: 100px; }
.seg-tab { border: 0; background: none; padding: 9px 22px; border-radius: 100px; font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--brown-3); cursor: pointer; transition: all .16s; }
.seg-tab:hover { color: var(--accent); }
.seg-tab.active { background: var(--bg); color: var(--accent); box-shadow: 0 2px 8px -4px rgba(36,30,22,.4); }
.seg-stage { margin-top: 26px; }
.seg-panel { display: none; }

/* ─── Three doors: pick your path ──────────────────────────────────────── */
.doors { margin-top: 56px; }
.doors-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.doors-head h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2.8vw, 34px); line-height: 1.15; color: var(--brown); text-wrap: balance; margin: 0; }
.doors-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.door {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 24px; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.door:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(36,30,22,.5); }
.door-ic { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; background: rgba(23,95,100,0.08); color: var(--accent); font-size: 25px; }
.door:hover .door-ic { background: var(--accent); color: #f3efe3; }
.door-tx { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
.door-title { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--brown); }
.door-sub { font-size: 15px; line-height: 1.4; color: var(--brown-4); }
.door-go { flex: 0 0 auto; font-size: 18px; color: var(--accent); transition: transform .16s ease; }
.door:hover .door-go { transform: translateX(4px); }
@media (max-width: 860px) { .doors-grid { grid-template-columns: 1fr; } }
.seg-panel.active { display: block; animation: segIn .4s ease both; }
@keyframes segIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.seg-card { display: grid; grid-template-columns: 0.92fr 1.08fr; border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; box-shadow: 0 34px 80px -50px rgba(36,30,22,.55); background: var(--bg); }
.seg-photo { position: relative; min-height: 320px; background-size: cover; background-position: center; }
.seg-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,38,35,.5), transparent 55%); }
.seg-pbadge { position: absolute; left: 16px; top: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(4,38,35,.62); border: 1px solid rgba(246,241,230,.25); padding: 6px 13px; border-radius: 100px; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.seg-pbadge i { color: var(--gold-soft); }
.seg-addr { position: absolute; left: 16px; bottom: 14px; z-index: 2; color: #f5f2e7; font-family: var(--serif); font-size: 20px; font-weight: 600; }
.seg-info { padding: 28px 30px; display: flex; flex-direction: column; }
.seg-role { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--gold); }
.seg-info h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 6px 0 4px; color: var(--brown); }
.seg-info > p { font-size: 15.5px; line-height: 1.55; color: var(--brown-3); margin: 0 0 18px; text-wrap: pretty; }
.seg-perm { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.seg-perm li { display: flex; align-items: flex-start; gap: 10px; font-size: 15.5px; color: var(--brown-2); line-height: 1.4; }
.seg-perm li i { font-size: 16px; flex: 0 0 auto; margin-top: 1px; }
.seg-perm li.yes i { color: var(--success); }
.seg-perm li.no i { color: var(--brown-4); }
.seg-perm li.no { color: var(--brown-4); }
.seg-foot { margin-top: auto; display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--brown-4); padding-top: 14px; border-top: 1px solid var(--line); text-wrap: pretty; }
.seg-foot i { font-size: 15px; color: var(--accent); flex: 0 0 auto; }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .tabswitch { grid-template-columns: 1fr; gap: 20px; }
  .ts-stage { min-height: 0; }
  .pin { grid-template-columns: 1fr; gap: 0; }
  .pin-media { position: relative; top: 0; height: auto; margin-bottom: 18px; }
  .pin-vis { position: relative; opacity: 1; visibility: visible; transform: none; display: none; }
  .pin-vis.active { display: block; }
  .pin-step { min-height: 0; opacity: 1; padding: 22px 0; border-top: 1px solid var(--line); }
  .seg-card { grid-template-columns: 1fr; }
  .seg-photo { min-height: 220px; }
}
@media (max-width: 560px) {
  .hero-toast { display: none; }
  .cloud-item { font-size: 16px; }
}
