/* FlowCraft Scope Estimator — demo page styles (extends site.css) */

.demo-hero { padding: 48px 0 40px; }
@media (min-width: 900px) { .demo-hero { padding: 72px 0 48px; } }
.demo-hero .lead { margin-bottom: 1.4rem; }
.demo-hero .lead code { font-size: .85em; }

.breadcrumb { font-size: .92rem; color: var(--ink-muted); margin-bottom: 1.2rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: #9aa3c2; }

.sample-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--dev-soft);
  border: 1px solid #f1d9a8;
  color: #5c3a00;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: .95rem;
  max-width: 44em;
}
.sample-note svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.sample-note p { margin: 0; }

/* ---------- Demo layout ---------- */
.demo-section { padding: 0 0 64px; }
@media (min-width: 900px) { .demo-section { padding-bottom: 96px; } }
.demo-layout { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .demo-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; } }
.demo-layout > .demo-frame { order: -1; }
@media (min-width: 900px) { .demo-layout > .demo-frame { order: 0; } }

.demo-guide h2 { font-size: 1.5rem; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.guide-steps li {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.guide-art { flex: none; width: 72px; height: 46px; background: var(--bg-soft); border-radius: 10px; display: grid; place-items: center; }
.guide-art svg { width: 60px; height: 38px; }
.guide-steps strong { display: block; }
.guide-steps li > span:last-child { color: var(--ink-muted); font-size: .96rem; }

.demo-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--ink);
  color: #c9cfe3;
  font-size: .85rem;
}
.demo-bar .dots { display: flex; gap: 6px; }
.demo-bar .dots span { width: 10px; height: 10px; border-radius: 50%; background: #3a4877; }
.demo-bar .label { margin-left: 8px; font-family: var(--mono); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-bar .badge {
  margin-left: auto;
  flex: none;
  background: #2b3a6b;
  color: #e6e1ff;
  border-radius: 999px;
  padding: .15rem .6rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
}

/* ---------- Widget (mirrors the estimator's controls) ---------- */
.widget { padding: 26px 18px 24px; }
@media (min-width: 480px) { .widget { padding: 34px 32px 32px; } }
.widget-kicker { font-size: .75rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 .2rem; }
.widget-title { font-size: 1.5rem; font-weight: 780; margin-bottom: 1.4rem; }
.field { margin: 0 0 24px; border: 0; padding: 0; min-width: 0; }
.field-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.field label[for], .field legend { font-weight: 650; font-size: .95rem; color: #2a3558; }
.field legend { margin-bottom: 10px; padding: 0; }
.size-pill {
  font-weight: 750;
  font-size: .9rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: .2rem .75rem;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.widget input[type="range"] { width: 100%; accent-color: var(--accent); height: 32px; cursor: pointer; margin: 0; }
.range-scale { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-muted); }

.pkg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pkg { position: relative; display: block; }
.pkg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pkg span {
  display: block;
  text-align: center;
  padding: .8rem .4rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-weight: 560;
  font-size: .95rem;
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.pkg span:hover { border-color: #c3c9da; }
.pkg input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.pkg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }

.price-box { background: var(--ink); color: #fff; border-radius: 16px; padding: 20px 22px; margin-top: 6px; }
.is-updated.price-box { animation: pulse .5s ease; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(143, 123, 255, .55); }
  100% { box-shadow: 0 0 0 10px rgba(143, 123, 255, 0); }
}
@media (prefers-reduced-motion: reduce) { .is-updated.price-box { animation: none; } }
.price-label { font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: #9aa3c2; margin: 0 0 4px; }
.price { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0; font-variant-numeric: tabular-nums; }

.email-demo { margin-top: 22px; }
.email-demo label { display: block; margin-bottom: 7px; font-size: .82rem; font-weight: 700; color: var(--ink-muted); }
.email-demo input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: .94rem; color: var(--ink); }
.email-demo input:focus { outline: 3px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent); }
.email-demo button { width: 100%; min-height: 44px; margin-top: 10px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-size: .94rem; font-weight: 750; cursor: pointer; }
.email-demo button:hover { background: #4931b6; }
.email-demo-note, .email-demo-feedback { margin: 9px 0 0; font-size: .8rem; line-height: 1.45; }
.email-demo-note { color: var(--ink-muted); }
.email-demo-feedback { color: var(--dev); font-weight: 700; }

.noscript-note { margin: 16px; padding: 14px 16px; border-radius: 12px; background: var(--dev-soft); color: #5c3a00; }
html:not(.js-estimator) .widget { opacity: .45; pointer-events: none; }

/* ---------- Calculation + config ---------- */
.config-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .config-grid { grid-template-columns: 1fr 1fr; gap: 48px; } }
.calc-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.calc-steps li { display: flex; gap: 14px; align-items: flex-start; }
.calc-num {
  flex: none;
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 700; font-size: .88rem;
}
.calc-steps strong { display: block; }
.calc-steps span { color: var(--ink-muted); font-size: .96rem; }
.calc-example { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: .95rem; color: var(--ink-muted); margin: 0; }
.calc-example strong { color: var(--ink); }

.code-card { margin: 0; background: #0f1b3d; color: #d8def0; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.code-card-head { padding: 10px 16px; background: #0a142f; font-family: var(--mono); font-size: .82rem; color: #9aa3c2; }
.code-card pre { margin: 0; padding: 18px 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: .9rem; line-height: 1.65; }
.code-card code { background: none; border: 0; padding: 0; color: inherit; font-size: 1em; }
.code-card .k { color: #b8a8ff; }
.code-card .n { color: #7fe0b5; }
.code-card :focus-visible { outline-color: #b8a8ff; }
.code-note { padding: 14px 18px 18px; border-top: 1px solid #22305c; font-size: .9rem; color: #b9c1dc; }
.code-note code { background: rgba(255, 255, 255, .1); border: 0; color: #fff; }

/* ---------- Files + requirements ---------- */
.req { margin-top: 24px; padding: 24px 22px; }
.req h3 { font-size: 1.1rem; }
.req ul { margin: 0; padding-left: 1.2rem; color: var(--ink-muted); }
.req li { margin-bottom: .5rem; }
.req strong { color: var(--ink); }

/* ---------- Offers ---------- */
.demo-offers { display: grid; gap: 20px; }
@media (min-width: 860px) { .demo-offers { grid-template-columns: 1fr 1fr; } }

/* ---------- Embedded live widget (home hero, FlowCraft card) ---------- */
.live-widget { position: relative; background: var(--surface); border-radius: 16px; }
.live-widget .widget { padding: 26px 20px 22px; }
@media (min-width: 480px) { .live-widget .widget { padding: 30px 28px 26px; } }
.live-widget .widget-title { font-size: 1.35rem; margin-bottom: 1.2rem; letter-spacing: -.02em; }
.live-badge {
  position: absolute; top: -12px; right: 16px; z-index: 2;
  background: #12a46b; color: #fff; font-size: .78rem; font-weight: 750;
  padding: .3rem .75rem; border-radius: 999px; box-shadow: 0 4px 12px rgba(18, 164, 107, .35);
  transform: rotate(3deg);
}
.product-shot-live { padding: 18px 14px 14px; }
.live-widget .price { font-size: clamp(1.45rem, 1rem + 1.9vw, 2rem); white-space: nowrap; }
@media (min-width: 900px) { .live-widget .price { font-size: clamp(1.6rem, .9rem + 1.1vw, 2rem); } }
.hero-grid > * { min-width: 0; }
.hero-visual:has(.live-widget) { padding: 10px; }
@media (max-width: 479px) {
  .live-widget .widget { padding: 24px 16px 18px; }
  .live-widget .pkg span { font-size: .86rem; padding: .75rem .2rem; }
  .live-widget .field-row label { font-size: .88rem; }
  .live-widget .pkg-grid { gap: 8px; }
}
@media (max-width: 379px) {
  .pkg span { font-size: .8rem; padding: .75rem .1rem; letter-spacing: -.01em; }
  .pkg-grid { gap: 6px; }
}
@media (max-width: 379px) {
  .live-widget .pkg span { font-size: .8rem; padding: .75rem .1rem; }
  .live-widget .price-box { padding: 16px 16px; }
  .live-widget .price { font-size: 1.3rem; }
}
@media (max-width: 479px) { .product-shot-live { padding: 14px 6px 6px; } }
@media (max-width: 419px) { .live-widget .price { font-size: 1.3rem; } .live-widget .price-box { padding: 16px; } }
@media (max-width: 479px) {
  #estimator .product-head { padding: 24px 14px; }
  .product-shot-live { padding: 14px 0 0; background: transparent; border: 0; }
  .product-shot-live .live-widget { border: 1px solid var(--line); }
}
