/* Phase 2 — demo calculators, workflow, digitization teaser */

.demo-calcs {
  background: var(--cream);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.demo-calcs__shell {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: 0 24px 60px rgba(26, 22, 18, 0.06);
}

.demo-calcs__tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-calcs__tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--cream);
  border-radius: var(--r-md);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-calcs__tab:hover {
  border-color: rgba(26, 22, 18, 0.22);
  transform: translateY(-1px);
}

.demo-calcs__tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.demo-calcs__tab-label {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.demo-calcs__tab-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.demo-calcs__tab.is-active .demo-calcs__tab-note {
  color: rgba(255, 255, 255, 0.62);
}

.demo-calcs__stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-calcs__panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: demoFade 0.35s var(--ease-out);
}

.demo-calcs__panel.is-active {
  display: flex;
}

@keyframes demoFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-widget {
  background: linear-gradient(160deg, #fff 0%, var(--cream) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-widget__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.demo-widget__title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.demo-widget__badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.demo-widget__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.demo-widget__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-widget__field label {
  font-size: 12px;
  color: var(--muted);
}

.demo-widget__field select,
.demo-widget__field input[type="number"],
.demo-widget__field input[type="range"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}

.demo-widget__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.demo-widget__result {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.demo-widget__price {
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.demo-widget__hint {
  font-size: 12px;
  color: var(--muted);
  max-width: 22ch;
  text-align: right;
  line-height: 1.4;
}

.demo-widget__cta {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 22, 18, 0.25);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.demo-widget__cta:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.demo-quiz__step {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.demo-quiz__step.is-active {
  display: flex;
}

.demo-quiz__q {
  font-weight: 600;
  font-size: 15px;
}

.demo-quiz__result {
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(217, 255, 58, 0.22);
  border: 1px solid rgba(26, 22, 18, 0.08);
  font-size: 14px;
  line-height: 1.5;
}

.demo-calcs__cards {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.demo-calcs__card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-calcs__card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.demo-calcs__card strong {
  font-size: 14px;
}

.demo-calcs__card span {
  font-size: 12px;
  color: var(--muted);
}

/* Workflow before / after */
.workflow-ba {
  background: var(--paper);
}

.workflow-ba__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
}

.workflow-ba__col {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px 28px 24px;
  background: var(--cream);
}

.workflow-ba__col--after {
  background: #fff;
  border-color: rgba(255, 61, 46, 0.22);
  box-shadow: 0 16px 48px rgba(255, 61, 46, 0.06);
}

.workflow-ba__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.workflow-ba__col h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 16px;
}

.workflow-ba__steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: wf;
}

.workflow-ba__steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}

.workflow-ba__steps li::before {
  counter-increment: wf;
  content: counter(wf);
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 12px;
  display: grid;
  place-items: center;
}

.workflow-ba__col--before .workflow-ba__steps li::before {
  background: rgba(26, 22, 18, 0.12);
  color: var(--muted);
}

.workflow-ba__arrow {
  align-self: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--accent);
  background: #fff;
}

.workflow-ba__cta {
  margin-top: 32px;
  text-align: center;
}

/* Digitization teaser */
.digi-teaser {
  margin-top: 28px;
}

.digi-teaser__card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(217, 255, 58, 0.14), rgba(255, 255, 255, 0.9));
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.digi-teaser__card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.digi-teaser__card h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.digi-teaser__card p {
  font-size: 14px;
  color: var(--muted);
  max-width: 52ch;
}

.digi-teaser__price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}

/* Testimonials — optional site link + photo slot */
.testi-role a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 22, 18, 0.15);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.testi-role a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.testi-avatar[data-photo-ready] {
  background-size: cover;
  background-position: center;
  color: transparent;
}

/* Lead magnet — site loss calculator (homepage agitate) */
.loss-calc {
  margin-top: 40px;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.loss-calc__head {
  margin-bottom: 20px;
}

.loss-calc__head h3 {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  margin: 0 0 8px;
}

.loss-calc__head p {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.62);
  max-width: 58ch;
}

.loss-calc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.loss-calc__fields {
  display: grid;
  gap: 14px;
}

.loss-calc__field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
}

/* Hide native number spinners */
.loss-calc input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.loss-calc input[type="number"]::-webkit-outer-spin-button,
.loss-calc input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Custom +/- stepper */
.num-stepper {
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.num-stepper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 61, 46, 0.25);
}

.num-stepper__btn {
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: 20px;
  line-height: 1;
  font-family: var(--font-body);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.num-stepper__btn:first-child {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.num-stepper__btn:last-child {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.num-stepper__btn:hover:not(:disabled) {
  background: rgba(255, 61, 46, 0.18);
  color: var(--accent);
}

.num-stepper__btn:active:not(:disabled) {
  background: rgba(255, 61, 46, 0.28);
}

.num-stepper__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.loss-calc__field .num-stepper input {
  flex: 1;
  min-width: 0;
  width: auto;
  padding: 12px 10px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  font-size: 16px;
  font-family: var(--font-body);
  text-align: center;
}

.loss-calc__field .num-stepper input:focus {
  outline: none;
}

.loss-calc__field .num-stepper input::placeholder {
  color: rgba(255, 255, 255, 0.32);
  font-size: 13px;
}

.loss-calc__results {
  padding: 20px;
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.loss-calc__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.loss-calc__row:last-of-type {
  border-bottom: none;
}

.loss-calc__row strong {
  color: var(--cream);
  font-weight: 600;
}

.loss-calc__gain {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 61, 46, 0.45);
}

.loss-calc__gain .loss-calc__value {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 22px;
}

.loss-calc__disclaimer {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
}

.loss-calc__cta {
  margin-top: 20px;
}

.case-founder-note {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent, #ff3d2e);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted, #6b6357);
  max-width: 58ch;
}

.case-founder-note cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 12px;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.04em;
  color: var(--muted, #6b6357);
}

@media (max-width: 960px) {
  .demo-calcs__shell {
    grid-template-columns: 1fr;
  }

  .demo-calcs__tabs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .demo-calcs__tab {
    min-width: 148px;
    flex: 0 0 auto;
  }

  .demo-calcs__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-ba__grid {
    grid-template-columns: 1fr;
  }

  .workflow-ba__arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .loss-calc__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .demo-calcs__cards {
    grid-template-columns: 1fr;
  }

  .demo-widget__result {
    flex-direction: column;
    align-items: flex-start;
  }

  .demo-widget__hint {
    text-align: left;
    max-width: none;
  }
}

/* Audit: flagship digi teaser */
.digi-teaser--flagship {
  margin-top: 36px;
}
.digi-teaser--flagship .digi-teaser__card {
  padding: 28px 30px;
  border-width: 2px;
  border-color: rgba(255, 61, 46, 0.35);
  background: linear-gradient(125deg, rgba(255, 61, 46, 0.08), rgba(217, 255, 58, 0.16) 45%, rgba(255, 255, 255, 0.95));
  box-shadow: 0 18px 40px -28px rgba(8, 6, 5, 0.45);
}
.digi-teaser__badge {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.digi-teaser--flagship .digi-teaser__card h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.digi-teaser--flagship .digi-teaser__card p {
  font-size: 15px;
  max-width: 58ch;
  color: var(--ink-soft);
}

/* Demo scenario groups */
.demo-calcs__scenarios {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}
.demo-calcs__group {
  display: grid;
  gap: 8px;
}
.demo-calcs__group-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.demo-calcs__group .demo-calcs__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Upgrade accordion extras */
.upgrade-more {
  grid-column: 1 / -1;
  margin-top: 8px;
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.45);
}
.upgrade-more > summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  list-style: none;
}
.upgrade-more > summary::-webkit-details-marker { display: none; }
.upgrade-more[open] > summary { margin-bottom: 14px; color: var(--accent); }
.upgrade-more__list {
  display: grid;
  gap: 12px;
}
@media (min-width: 720px) {
  .upgrade-more__list {
    grid-template-columns: 1fr 1fr;
  }
}

/* Founder own projects */
.founder-own-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.founder-own-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 22, 18, 0.18);
}
.founder-own-list a:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* Ownership checks */
.ownership-checks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 18px 0 14px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.ownership-checks li {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-soft);
}
.ownership-checks--compact li {
  background: var(--cream);
}

/* Trust args */
.trust-args {
  padding: clamp(40px, 6vw, 72px) 0;
  background: var(--cream-2);
}
.trust-args__grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 800px) {
  .trust-args__grid { grid-template-columns: 1fr 1fr; }
}
.trust-args__card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 28px);
}
.trust-args__card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.trust-args__card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

/* Demo-linked testimonials demoted */
.testi-card--demo {
  opacity: 0.72;
  order: 20;
}
.loss-calc__budget strong {
  font-variant-numeric: tabular-nums;
}
