/* ===== Workflow Builder styles ===== */
.wb-body { background: var(--ivory); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* HERO */
.wb-hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%); color: var(--ivory); padding: 70px 32px 80px; position: relative; overflow: hidden; }
.wb-hero::before { content:''; position:absolute; top:-200px; right:-200px; width:600px; height:600px; background:radial-gradient(circle, rgba(201,169,97,0.08), transparent 70%); pointer-events:none; }
.wb-hero-inner { max-width: 1100px; margin: 0 auto; position: relative; }
.wb-hero h1 { font-family:'Playfair Display',serif; font-size: clamp(34px, 5vw, 56px); font-weight:600; line-height:1.1; letter-spacing:-0.5px; margin-bottom: 16px; }
.wb-hero h1 em { color: var(--gold); font-style: italic; }
.wb-hero .sub { font-size: 17px; line-height:1.55; max-width: 640px; color: rgba(244,241,232,0.78); margin-bottom: 40px; }

/* FORM */
.wb-form { max-width: 880px; }
.wb-form textarea {
  width: 100%; background: rgba(244,241,232,0.05); border: 1px solid rgba(201,169,97,0.3);
  color: var(--ivory); font-family: inherit; font-size: 16px; line-height: 1.5;
  padding: 20px 22px; border-radius: 4px; resize: vertical; transition: border-color .2s, background .2s;
}
.wb-form textarea::placeholder { color: rgba(244,241,232,0.4); }
.wb-form textarea:focus { outline: none; border-color: var(--gold); background: rgba(244,241,232,0.07); }

.wb-form-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; flex-wrap: wrap; }
.wb-examples { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wb-ex-label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(244,241,232,0.55); margin-right: 4px; }
.wb-ex {
  background: transparent; border: 1px solid rgba(201,169,97,0.35); color: var(--ivory);
  font-family: inherit; font-size: 13px; padding: 8px 14px; border-radius: 2px; cursor: pointer;
  transition: all .2s;
}
.wb-ex:hover { background: rgba(201,169,97,0.12); border-color: var(--gold); }

.wb-submit {
  background: var(--gold); border: none; color: var(--navy); font-family: inherit; font-weight: 600;
  font-size: 15px; padding: 14px 24px; border-radius: 2px; cursor: pointer; letter-spacing: 0.2px;
  transition: all .2s;
}
.wb-submit:hover { background: var(--gold-soft); transform: translateY(-1px); }
.wb-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.wb-meta { font-size: 12px; color: rgba(244,241,232,0.5); margin-top: 14px; letter-spacing: 0.3px; }

/* RESULT STAGE */
.wb-result { display: none; padding: 60px 32px 40px; background: var(--ivory); }
.wb-result.active { display: block; }
.wb-result-inner { max-width: 1280px; margin: 0 auto; }

.wb-stage { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 18px; align-items: stretch; margin-bottom: 50px; }
.wb-vs { display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--gold); font-family: 'Playfair Display', serif; }

.wb-flow { background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 6px; padding: 28px; box-shadow: 0 2px 12px rgba(10,26,58,0.04); opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.wb-flow.visible { opacity: 1; transform: translateY(0); }

.wb-flow-header { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.wb-flow-tag { display: inline-block; padding: 5px 12px; border-radius: 2px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; margin-bottom: 12px; }
.wb-tag-manual { background: #ececec; color: #6b6b6b; }
.wb-tag-auto { background: rgba(201,169,97,0.18); color: #8a6f2e; }
.wb-flow-header h3 { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 600; color: var(--navy); margin-bottom: 14px; }
.wb-flow-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.wb-stat { font-size: 13px; }
.wb-stat-num { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600; color: var(--navy); display: block; line-height: 1; }
.wb-flow-auto .wb-stat-num { color: var(--gold); }
.wb-stat-lbl { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-top: 4px; display: block; }

.wb-flow-canvas { display: flex; flex-direction: column; gap: 0; }

.wb-node {
  position: relative; padding: 16px 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.08); background: #fafaf7;
  opacity: 0; transform: translateY(10px); animation: nodeIn .45s ease forwards;
}
.wb-flow-manual .wb-node { background: #f5f5f3; border-color: #d8d8d4; }
.wb-flow-auto .wb-node { background: #fff; border-left: 3px solid var(--gold); }
.wb-flow-auto .wb-node.type-ai { background: linear-gradient(180deg, #fff 0%, rgba(201,169,97,0.08) 100%); }

@keyframes nodeIn { to { opacity: 1; transform: translateY(0); } }

.wb-node-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.wb-node-label { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.wb-flow-auto .wb-node-label { font-weight: 600; }
.wb-node-time { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wb-flow-auto .wb-node-time { color: var(--gold); font-weight: 600; }
.wb-node-pain { font-size: 12px; color: #a23b3b; margin-top: 6px; font-style: italic; line-height: 1.4; }
.wb-node-type { display: inline-block; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; margin-right: 8px; padding: 2px 6px; border-radius: 2px; vertical-align: middle; }
.wb-type-manual { background: #ddd; color: #555; }
.wb-type-ai { background: var(--gold); color: var(--navy); }
.wb-type-notification { background: #cfe1d0; color: #2e5a36; }
.wb-type-integration { background: #d4d8e6; color: #354075; }

.wb-arrow { display: flex; justify-content: center; padding: 6px 0; color: rgba(0,0,0,0.25); font-size: 18px; opacity: 0; animation: nodeIn .35s ease forwards; }
.wb-flow-auto .wb-arrow { color: var(--gold); }

/* CTA */
.wb-cta-row { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; opacity: 0; transition: opacity .5s ease; }
.wb-cta-row.visible { opacity: 1; }
.wb-cta-primary {
  background: var(--navy); color: var(--ivory); text-decoration: none; padding: 16px 30px;
  border-radius: 2px; font-weight: 600; font-size: 16px; letter-spacing: 0.2px;
  border: 1px solid var(--navy); transition: all .2s;
}
.wb-cta-primary:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.wb-cta-secondary {
  background: transparent; color: var(--navy); border: 1px solid rgba(10,26,58,0.25);
  padding: 14px 22px; border-radius: 2px; font-family: inherit; font-size: 14px; cursor: pointer;
  transition: all .2s;
}
.wb-cta-secondary:hover { border-color: var(--navy); }

/* LEAD CAPTURE */
.wb-lead {
  background: var(--navy); color: var(--ivory); border-radius: 6px; padding: 28px 32px;
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  opacity: 0; transition: opacity .5s ease .2s;
}
.wb-lead.visible { opacity: 1; }
.wb-lead-text strong { display: block; font-family: 'Playfair Display', serif; font-size: 22px; margin-bottom: 4px; }
.wb-lead-text span { color: rgba(244,241,232,0.7); font-size: 14px; }
.wb-lead-form { display: flex; gap: 10px; }
.wb-lead-form input {
  background: rgba(244,241,232,0.08); border: 1px solid rgba(201,169,97,0.35); color: var(--ivory);
  font-family: inherit; font-size: 14px; padding: 12px 16px; border-radius: 2px; min-width: 260px;
}
.wb-lead-form input:focus { outline: none; border-color: var(--gold); }
.wb-lead-form input::placeholder { color: rgba(244,241,232,0.4); }
.wb-lead-form button {
  background: var(--gold); border: none; color: var(--navy); font-family: inherit; font-weight: 600;
  padding: 12px 20px; border-radius: 2px; cursor: pointer; font-size: 14px; transition: background .2s;
}
.wb-lead-form button:hover { background: var(--gold-soft); }
.wb-lead-thanks { color: var(--gold); font-size: 15px; font-weight: 500; }

/* LOADING */
.wb-loading { display: none; padding: 80px 32px; background: var(--ivory); text-align: center; }
.wb-loading.active { display: block; }
.wb-loading-inner { max-width: 500px; margin: 0 auto; }
.wb-spinner {
  width: 42px; height: 42px; border: 3px solid rgba(10,26,58,0.1); border-top-color: var(--gold);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.wb-loading-text { color: var(--navy); font-size: 16px; font-family: 'Playfair Display', serif; font-style: italic; }

/* ERROR */
.wb-error { display: none; padding: 80px 32px; background: var(--ivory); text-align: center; }
.wb-error.active { display: block; }
.wb-error-inner { max-width: 520px; margin: 0 auto; }
.wb-error h3 { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--navy); margin-bottom: 12px; }
.wb-error p { color: var(--muted); font-size: 15px; margin-bottom: 22px; line-height: 1.5; }
.wb-error a { color: var(--navy); border-bottom: 1px solid var(--gold); text-decoration: none; }

@media (max-width: 840px) {
  .wb-stage { grid-template-columns: 1fr; }
  .wb-vs { transform: rotate(90deg); padding: 10px 0; }
  .wb-form-row { flex-direction: column; align-items: stretch; }
  .wb-submit { width: 100%; }
  .wb-lead { flex-direction: column; align-items: stretch; }
  .wb-lead-form { flex-direction: column; }
  .wb-lead-form input { min-width: 0; width: 100%; }
}
