/* Scout homepage demo — a small framed window that replays the real Stone
 * Scout flow using the member app's exact component classes and CSS rules.
 * Every component rule below is copied verbatim from the app (stone-scout
 * inline styles + ScoutAffiliate injected styles), scoped under .sdemo so the
 * marketing page styles never bleed in or out. Same fonts, colors, spacing.
 */

.sdemo { max-width: 720px; margin: 0 auto; width: 100%; }
.sdemo-cap {
  text-align: center; font-size: 14px; font-weight: 700; color: var(--teal-700);
  min-height: 40px; display: flex; align-items: flex-end; justify-content: center;
  padding: 0 8px 10px; line-height: 1.35; transition: opacity 0.25s;
}
.sdemo-cap.fade { opacity: 0; }
.sdemo-win {
  position: relative; background: #f6fbfa; border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 16px; box-shadow: 0 12px 32px rgba(13, 148, 136, 0.12);
  overflow: hidden; cursor: pointer;
}
.sdemo-bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  background: white; border-bottom: 1px solid var(--gray-100, #f1f5f9);
}
.sdemo-bar span { width: 10px; height: 10px; border-radius: 50%; }
.sdemo-bar .d1 { background: #fca5a5; } .sdemo-bar .d2 { background: #fcd34d; } .sdemo-bar .d3 { background: #86efac; }
.sdemo-bar b { margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--gray-500, #64748b); letter-spacing: 0.4px; }
.sdemo-body { position: relative; overflow: hidden; }
.sdemo-stage { position: absolute; top: 0; left: 0; width: 780px; transform-origin: top left; }
.sdemo-screen { position: absolute; top: 0; left: 0; width: 100%; padding: 14px; opacity: 0; visibility: hidden; transition: opacity 0.3s; }
.sdemo-screen.on { opacity: 1; visibility: visible; }

/* Animated cursor dot */
.sdemo-cursor {
  position: absolute; z-index: 30; width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal-600, #0d9488); border: 3px solid white;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.5); pointer-events: none;
  transition: left 0.7s cubic-bezier(0.45, 0, 0.25, 1), top 0.7s cubic-bezier(0.45, 0, 0.25, 1);
  margin: -9px 0 0 -9px;
}
.sdemo-cursor.tap { animation: sdemoTap 0.4s ease; }
@keyframes sdemoTap { 40% { transform: scale(0.62); } 100% { transform: scale(1); } }
.sdemo-cursor::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--teal-500, #14b8a6); opacity: 0; transform: scale(0.4);
}
.sdemo-cursor.tap::after { animation: sdemoRipple 0.45s ease-out; }
@keyframes sdemoRipple { 0% { opacity: 0.8; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.4); } }

/* Replay rest state */
.sdemo-replay {
  position: absolute; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(1px);
}
.sdemo-win.rested .sdemo-replay { display: flex; }
.sdemo-replay button {
  font-family: inherit; font-size: 14px; font-weight: 700; color: white;
  background: var(--teal-600, #0d9488); border: none; border-radius: 100px;
  padding: 12px 26px; cursor: pointer; box-shadow: 0 6px 18px rgba(13, 148, 136, 0.35);
}
.sdemo-replay button:hover { background: var(--teal-700, #0f766e); }

/* Demo-only cheapest row highlight */
.sdemo .sc-table tr.sdemo-best td { background: var(--teal-50, #f0fdfa); }
.sdemo .sc-table tr.sdemo-best td:first-child { box-shadow: inset 3px 0 0 var(--teal-500, #14b8a6); }
.sdemo .sc-table tbody tr { opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; }
.sdemo .sc-table tbody tr.show { opacity: 1; transform: none; }
.sdemo.static .sc-table tbody tr { opacity: 1; transform: none; transition: none; }

/* ── Copied app component rules (scoped) ─────────────────────────── */
.sdemo .sc-card { background: white; border: 1px solid var(--gray-100); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.sdemo .sc-step-label { font-size: 13px; font-weight: 800; color: var(--teal-700); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }

.sdemo .cg-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sdemo .cg-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; background: transparent; border: none; cursor: pointer; padding: 6px; border-radius: 12px; transition: all 0.15s; font-family: inherit; }
.sdemo .cg-btn.active { background: var(--teal-100); transform: scale(1.06); }
.sdemo .cg-swatch { width: 46px; height: 46px; border-radius: 50%; border: 3px solid; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.sdemo .cg-btn.active .cg-swatch { box-shadow: 0 0 0 2px white, 0 0 0 4px var(--teal-500); }
.sdemo .cg-label { font-size: 12px; font-weight: 600; color: var(--gray-600); }
.sdemo .cg-btn.active .cg-label { color: var(--teal-700); }
.sdemo .cg-count { font-size: 10px; color: var(--gray-400); }

.sdemo .color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; max-height: 235px; overflow-y: auto; scrollbar-width: thin; }
.sdemo .color-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 8px; border-radius: 14px; border: none; cursor: pointer; background: transparent; transition: all 0.15s; font-family: inherit; }
.sdemo .color-card.active { background: var(--teal-600); }
.sdemo .color-img { width: 92px; height: 92px; border-radius: 12px; object-fit: cover; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.sdemo .color-img-empty { display: flex; align-items: center; justify-content: center; background: var(--gray-100); color: var(--gray-300); font-size: 26px; }
.sdemo .color-name { font-size: 12px; font-weight: 600; color: var(--gray-700); line-height: 1.2; }
.sdemo .color-card.active .color-name { color: white; }
.sdemo .color-sellers { font-size: 10px; color: var(--gray-400); }
.sdemo .color-sellers.mid { color: var(--teal-600); }
.sdemo .color-sellers.strong { color: var(--teal-700); font-weight: 700; }
.sdemo .color-card.active .color-sellers { color: rgba(255,255,255,0.8); }

.sdemo .size-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sdemo .size-btn { padding: 10px 20px; border-radius: 100px; font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; background: white; border: 2px solid var(--teal-200); color: var(--teal-700); transition: all 0.15s; }
.sdemo .size-btn.active { background: var(--teal-600); color: white; border-color: var(--teal-600); }

.sdemo .sc-result-head { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding: 12px 18px; }
.sdemo .sc-result-head h2 { font-size: 18px; font-weight: 800; color: var(--teal-800); margin: 0; }
.sdemo .sc-result-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.sdemo .sc-table-wrap { border-top-left-radius: 0; border-top-right-radius: 0; padding: 0; overflow: hidden; margin-bottom: 0; }
.sdemo .sc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sdemo .sc-table thead tr { background: var(--teal-100); border-bottom: 2px solid var(--teal-200); }
.sdemo .sc-table th { padding: 8px 8px; color: var(--teal-800); font-weight: 700; font-size: 11px; }
.sdemo .ta-left { text-align: left; } .sdemo .ta-right { text-align: right; } .sdemo .ta-center { text-align: center; }
.sdemo .sc-table td { padding: 7px 8px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
.sdemo .row-img { width: 36px; height: 36px; min-width: 36px; border-radius: 8px; object-fit: cover; display: block; margin: 0 auto; }
.sdemo .row-img-empty { width: 36px; height: 36px; min-width: 36px; border-radius: 8px; background: var(--gray-100); display: inline-block; }
.sdemo .col-supplier { font-weight: 600; }
.sdemo .col-supplier .seller-name { display: block; max-width: 110px; line-height: 1.25; }
.sdemo .col-altname { color: var(--gray-400); font-size: 11px; font-style: italic; max-width: 120px; line-height: 1.3; }
.sdemo .pack-note { display: block; font-weight: 400; font-size: 10px; color: var(--gray-400); margin-top: 2px; }
.sdemo .cps { font-weight: 800; color: var(--teal-700); }
.sdemo .muted { color: var(--gray-500); }
.sdemo .ret-dot { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; line-height: 0; }
.sdemo .ret-dot svg { width: 22px; height: 22px; }
.sdemo .ret-dot.good { color: var(--teal-700); } .sdemo .ret-dot.bad { color: var(--gray-400); }
.sdemo .stock-cell { display: inline-flex; align-items: center; gap: 6px; }
.sdemo .stock-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sdemo .stock-dot.in { background: var(--teal-500); } .sdemo .stock-dot.out { background: var(--coral); }
.sdemo .stock-dot.checking { background: var(--gray-300, #cbd5e1); animation: sdemoStockPulse 1s ease-in-out infinite; }
@keyframes sdemoStockPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.sdemo .check-btn { font-size: 11px; background: var(--teal-100); color: var(--teal-700); border: none; padding: 3px 10px; border-radius: 100px; font-family: inherit; font-weight: 600; cursor: pointer; }
.sdemo .check-btn.in { background: #dcfce7; color: #15803d; }
.sdemo .view-link { color: var(--teal-700); font-size: 12px; font-weight: 700; text-decoration: underline; }

/* Affiliate badge + popover, copied from the app's injected ScoutAffiliate CSS */
.sdemo .aff-badge { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; padding: 0; background: var(--gray-100, #f1f5f9); color: var(--gray-400, #94a3b8); transition: transform 0.15s; vertical-align: middle; }
.sdemo .aff-badge svg { width: 17px; height: 17px; }
.sdemo .aff-badge.tier-all { background: linear-gradient(135deg, #6ee7b7, #10b981); color: #064e3b; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35); }
.sdemo .aff-pop { position: absolute; z-index: 35; max-width: 250px; background: white; border: 1px solid var(--gray-200, #e2e8f0); border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18); padding: 14px 16px; text-align: left; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }
.sdemo .aff-pop.on { opacity: 1; visibility: visible; transform: none; }
.sdemo .aff-pop-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: #059669; margin-bottom: 6px; }
.sdemo .aff-pop-head svg { width: 15px; height: 15px; flex: 0 0 auto; }
.sdemo .aff-pop-offer { font-size: 13px; line-height: 1.45; color: var(--gray-700, #334155); }
.sdemo .aff-pop-code { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.sdemo .aff-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 700; color: var(--gray-700, #334155); background: var(--gray-50, #f8fafc); border: 1.5px dashed var(--gray-300, #cbd5e1); border-radius: 8px; padding: 6px 10px; }
.sdemo .aff-copy { font-family: inherit; font-size: 12px; font-weight: 700; color: white; background: linear-gradient(135deg, var(--teal-500, #14b8a6), var(--teal-600, #0d9488)); border: none; border-radius: 8px; padding: 7px 14px; cursor: pointer; }

/* Mini variant sizing */
.sdemo-mini { max-width: 560px; }
.sdemo-mini .sdemo-cap { display: none; }

@media (prefers-reduced-motion: reduce) {
  .sdemo .stock-dot.checking { animation: none; }
  .sdemo-cursor { display: none !important; }
}

/* Standalone demo section right under the hero supplier strip */
.demo-section {
  padding: clamp(56px, 7vw, 100px) clamp(20px, 2vw, 24px);
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}
.demo-section .section-header { max-width: 1120px; margin: 0 auto 40px; }

/* ── Sizer and calculator demo component rules, copied from the app's
     app-styles.css and scoped under .sdemo ─────────────────────────── */
.sdemo .app-card { background: white; border: 1px solid var(--gray-100); border-radius: 20px; padding: 28px; margin-bottom: 22px; box-shadow: 0 2px 12px rgba(15, 23, 42, 0.03); }
.sdemo .app-card-title { font-size: 13px; font-weight: 700; color: var(--teal-700); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.sdemo .app-card-h { font-size: 20px; font-weight: 800; color: var(--gray-900); letter-spacing: -0.02em; margin-bottom: 18px; }
.sdemo .form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.sdemo .form-row label { font-size: 13px; font-weight: 700; color: var(--gray-700); }
.sdemo .form-row input, .sdemo .form-row select { font-family: inherit; font-size: 15px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--gray-200); background: white; color: var(--gray-900); transition: border-color 0.18s ease, box-shadow 0.18s ease; pointer-events: none; }
.sdemo .form-row input.focus, .sdemo .form-row select.focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18); }
.sdemo .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.sdemo .pattern-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.sdemo .pattern-option { background: white; border: 2px solid var(--gray-200); border-radius: 14px; padding: 18px; cursor: default; transition: border-color 0.18s, background 0.18s; text-align: left; font-family: inherit; }
.sdemo .pattern-option.active { border-color: var(--teal-500); background: linear-gradient(135deg, var(--teal-100), #fff); }
.sdemo .pattern-option h4 { font-size: 15px; font-weight: 800; color: var(--gray-900); margin: 0 0 4px; }
.sdemo .pattern-option p { font-size: 12px; color: var(--gray-500); line-height: 1.4; margin: 0; }
.sdemo .pattern-option-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; background: var(--teal-100); border-radius: 10px; }
.sdemo .result-card { background: linear-gradient(135deg, var(--teal-100), #fff); border: 2px solid var(--teal-300); border-radius: 18px; padding: 24px; position: relative; overflow: hidden; }
.sdemo .result-card::before { content: ''; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px; background: radial-gradient(circle, rgba(20, 184, 166, 0.18), transparent); pointer-events: none; }
.sdemo .result-card-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--teal-700); text-transform: uppercase; letter-spacing: 1.4px; margin-bottom: 6px; }
.sdemo .result-card-label-paw { width: 18px; height: 18px; }
.sdemo .result-card-label-paw img { width: 100%; height: 100%; object-fit: contain; }
.sdemo .result-card-value { font-size: 38px; font-weight: 800; color: var(--gray-900); letter-spacing: -0.04em; line-height: 1.1; }
.sdemo .result-card-meta { font-size: 13px; color: var(--gray-600); margin-top: 6px; }
.sdemo .result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.sdemo .sizer-stage { background: white; border: 2px solid var(--teal-200); border-radius: 20px; padding: 32px 24px; text-align: center; }
.sdemo .sizer-instructions { font-size: 13px; color: var(--gray-500); margin-bottom: 18px; }
.sdemo .sizer-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 32px 0; min-height: 80px; flex-wrap: wrap; }
.sdemo .sizer-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0 8px; flex-wrap: wrap; }
.sdemo .sizer-size-display { font-size: 28px; font-weight: 800; color: var(--teal-700); letter-spacing: -0.02em; }
.sdemo .sizer-mm-display { font-size: 14px; color: var(--gray-500); }
.sdemo .sizer-slider-wrap { max-width: 460px; margin: 18px auto; }
.sdemo .bone-slider-wrap { position: relative; padding-top: 60px; margin-top: 20px; }
.sdemo .bone-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 100px; background: linear-gradient(90deg, #047857, #10b981 50%, #6ee7b7); outline: none; pointer-events: none; }
.sdemo .bone-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 52px; height: 32px; background-image: url("/images/bone.png"); background-size: contain; background-repeat: no-repeat; background-position: center; background-color: transparent; border: none; filter: drop-shadow(0 2px 4px rgba(4, 120, 87, 0.45)); }
.sdemo .bone-slider::-moz-range-thumb { width: 52px; height: 32px; background-image: url("/images/bone.png"); background-size: contain; background-repeat: no-repeat; background-position: center; background-color: transparent; border: none; filter: drop-shadow(0 2px 4px rgba(4, 120, 87, 0.45)); }
.sdemo .scout-hopper { position: absolute; top: 0; width: 64px; height: 64px; margin-left: -32px; pointer-events: none; transition: left 0.18s cubic-bezier(0.34, 1.56, 0.64, 1); }
.sdemo .scout-hopper img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.18)); }
.sdemo .scout-hopper.hop { animation: sdemoScoutHop 0.5s ease-out; }
@keyframes sdemoScoutHop {
  0% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-14px) rotate(-8deg); }
  55% { transform: translateY(-18px) rotate(0); }
  80% { transform: translateY(-6px) rotate(6deg); }
  100% { transform: translateY(0) rotate(0); }
}
.sdemo .sizer-dime { position: relative; display: inline-block; line-height: 0; }
.sdemo .dime-coin { border-radius: 50%; object-fit: cover; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22); display: block; }
.sdemo .sizer-dime .sizer-stone { position: absolute; left: 18%; top: 65%; transform: translate(-50%, -100%); z-index: 2; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #99f6e4, #0d9488 55%, #115e59 90%); box-shadow: 0 4px 10px rgba(15, 23, 42, 0.45), 0 2px 4px rgba(15, 23, 42, 0.25), inset 0 -2px 4px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(20, 184, 166, 0.55); border: 1px solid rgba(15, 23, 42, 0.4); transition: width 0.25s ease, height 0.25s ease; animation: sdemoStonePulse 1.6s ease-in-out infinite; }
.sdemo .sizer-dime .sizer-stone.settled { animation: sdemoStoneGlow 2.4s ease-in-out infinite; }
@keyframes sdemoStonePulse {
  0%, 100% { transform: translate(-50%, -100%) scale(1); }
  50% { transform: translate(-50%, -100%) scale(1.18); }
}
@keyframes sdemoStoneGlow {
  0%, 100% { box-shadow: 0 4px 10px rgba(15, 23, 42, 0.45), 0 2px 4px rgba(15, 23, 42, 0.25), inset 0 -2px 4px rgba(0, 0, 0, 0.2), 0 0 6px rgba(20, 184, 166, 0.5); }
  50% { box-shadow: 0 5px 12px rgba(15, 23, 42, 0.5), 0 3px 6px rgba(15, 23, 42, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2), 0 0 14px rgba(20, 184, 166, 0.7); }
}

/* Demo-only reveal helpers shared by the sizer and calculator demos */
.sdemo .sdemo-reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.35s, transform 0.35s; }
.sdemo .sdemo-reveal.show { opacity: 1; transform: none; }
.sdemo.static .sdemo-reveal { opacity: 1; transform: none; transition: none; }
.sdemo .form-row input.pop { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18); }

@media (prefers-reduced-motion: reduce) {
  .sdemo .sizer-dime .sizer-stone, .sdemo .sizer-dime .sizer-stone.settled { animation: none; }
}

/* Inline demo blocks inside the how-it-works and features sections */
.sdemo-inline {
  max-width: 760px;
  margin: 42px auto 0;
}
.sdemo-inline .sdemo { max-width: none; }

/* Dime callout: explicit instruction in brand teal */
.sdemo .sizer-dime-callout {
  font-size: 14px; font-weight: 700; color: var(--teal-700, #0f766e);
  margin: -8px 0 16px; line-height: 1.5;
}
.sdemo .sizer-dime-callout strong { font-weight: 800; }
.sdemo-cap .sdemo-cap-em { font-weight: 800; color: var(--teal-700, #0f766e); }
