/* Pilot-only styles. Inherits the base palette from styles.css. */

.pilot-page { background: var(--paper, #f7f8f3); color: var(--ink, #171916); }
.pilot-page .brand img { width: 28px; height: 28px; }

.pilot-badge {
  background: var(--ink, #171916);
  color: var(--paper, #f7f8f3);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

.pilot-main { max-width: 1080px; margin: 0 auto; padding: 1.5rem 1.5rem 5rem; display: grid; gap: 2rem; }

.pilot-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 1rem; letter-spacing: -0.01em; }
.pilot-lede { font-size: 1.1rem; color: #4c5a50; max-width: 60ch; margin: 0; line-height: 1.55; }

.pilot-section-title { font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; color: #61665e; margin: 0 0 1.25rem; font-weight: 500; }

.pilot-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

.pilot-card {
  background: #fff;
  border: 1px solid #e4dfd1;
  border-radius: 12px;
  padding: 1.5rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.pilot-card h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.pilot-card p { margin: 0; color: #4c5a50; font-size: 0.92rem; line-height: 1.5; }
.pilot-card-link { color: var(--copper, #a96f43); font-weight: 500; text-decoration: none; font-size: 0.95rem; margin-top: 0.4rem; }
.pilot-card-link:hover { text-decoration: underline; }
.pilot-card-link.disabled { color: #9ca6a0; cursor: not-allowed; }
.pilot-card-link.disabled:hover { text-decoration: none; }

.pilot-footer { padding: 2rem 1.5rem 3rem; text-align: center; color: #61665e; font-size: 0.85rem; }

/* ===== Magic-link request modal (used on index.html and pilot.html) ===== */
.pilot-login-dialog {
  border: 1px solid #e4dfd1;
  border-radius: 14px;
  padding: 0;
  background: #fff;
  color: var(--ink, #171916);
  max-width: 380px;
  width: calc(100% - 32px);
  box-shadow: 0 22px 70px rgba(23, 25, 22, 0.18);
}
.pilot-login-dialog::backdrop { background: rgba(23, 25, 22, 0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.pilot-login-form { display: grid; gap: 1rem; padding: 1.75rem; }
.pilot-login-form h2 { margin: 0; font-size: 1.15rem; }
.pilot-login-form p.pilot-login-hint { margin: 0; color: #61665e; font-size: 0.85rem; line-height: 1.45; }
.pilot-login-form label { display: grid; gap: 0.35rem; font-size: 0.85rem; }
.pilot-login-form input { padding: 0.6rem 0.8rem; border: 1px solid #e4dfd1; border-radius: 8px; font: inherit; background: #fafbf8; }
.pilot-login-form input:focus { outline: 2px solid var(--copper, #a96f43); outline-offset: 1px; }
.pilot-login-error { color: #b73e22; font-size: 0.85rem; margin: 0; }
.pilot-login-success { color: #2e6b4a; font-size: 0.9rem; margin: 0; }
.pilot-login-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.pilot-login-actions button {
  padding: 0.55rem 1.1rem; border: 1px solid #e4dfd1; border-radius: 8px;
  background: #fff; cursor: pointer; font: inherit; color: inherit;
}
.pilot-login-actions button.primary {
  background: var(--ink, #171916); color: var(--paper, #f7f8f3); border-color: var(--ink, #171916);
}
.pilot-login-actions button[disabled] { opacity: 0.6; cursor: wait; }

/* ===== Journey wizard (pilot.html) ===== */
.journey { max-width: 920px; margin: 0 auto; }
.journey-header { margin-bottom: 2rem; }
.journey-eyebrow { font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--copper, #a96f43); margin: 0 0 0.75rem; font-weight: 600; }
.journey h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 1rem; letter-spacing: -0.01em; }
.journey-lede { color: #4c5a50; max-width: 65ch; margin: 0; line-height: 1.55; font-size: 1.05rem; }

.journey-stepper {
  list-style: none; padding: 0; margin: 0 0 2rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem; counter-reset: step;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.journey-stepper li {
  flex: 1 1 auto; min-width: 100px;
  padding: 0.55rem 0.8rem; border-radius: 8px;
  background: #f2f5ee; color: #61665e;
  border: 1px solid transparent;
  transition: background 120ms, color 120ms;
  text-align: center; font-weight: 500;
}
.journey-stepper li.done { color: var(--moss, #486b50); background: rgba(72, 107, 80, 0.08); }
.journey-stepper li.active { color: var(--ink, #171916); background: #fff; border-color: var(--copper, #a96f43); font-weight: 600; }

.journey-form { display: grid; gap: 2rem; }
.journey-step { border: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.journey-step[hidden] { display: none; }
.journey-step legend { font-size: 1.4rem; font-weight: 600; padding: 0; margin: 0 0 0.5rem; color: var(--ink); }
.journey-step-hint { color: #61665e; font-size: 0.95rem; margin: 0 0 0.5rem; line-height: 1.5; }

.journey-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; }
.journey-cards-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.journey-card {
  display: grid; gap: 0.4rem; padding: 1.15rem;
  background: #f3f3ef; border: 2px solid #d8d8d2; border-radius: 12px;
  cursor: pointer; transition: background 150ms, border-color 150ms, box-shadow 150ms, transform 80ms;
  position: relative;
}
.journey-card:hover { border-color: #b9b9b1; background: #ebeae3; }
.journey-card input { position: absolute; opacity: 0; pointer-events: none; }
.journey-card:has(input:checked) {
  background: #e3f4e6;
  border-color: #2a8c4a;
  box-shadow: 0 0 0 2px rgba(42,140,74,0.18) inset, 0 4px 14px rgba(42,140,74,0.10);
}
.journey-card:has(input:checked) .journey-card-title { color: #1c5b32; }
.journey-card:has(input:checked)::after {
  content: "✓";
  position: absolute; top: 8px; right: 10px;
  color: #2a8c4a; font-weight: 700; font-size: 1rem;
}
.journey-card.compact { padding: 0.85rem 1rem; }
.journey-card.compact .journey-card-title { font-size: 0.95rem; }
.journey-card-title { font-weight: 600; font-size: 1rem; color: #4a4a44; }
.journey-card-desc { color: #6b6b66; font-size: 0.88rem; line-height: 1.45; }

.journey-textarea { display: grid; gap: 0.4rem; font-size: 0.9rem; color: #4c5a50; }
.journey-textarea textarea {
  font: inherit; padding: 0.75rem; border-radius: 10px; border: 1px solid #e4dfd1;
  background: #fafbf8; color: var(--ink, #171916); resize: vertical;
}
.journey-textarea textarea:focus { outline: 2px solid var(--copper, #a96f43); outline-offset: 1px; }

.journey-nav { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 1.5rem; }
.journey-nav button {
  padding: 0.7rem 1.4rem; border-radius: 10px; border: 1px solid #e4dfd1;
  background: #fff; cursor: pointer; font: inherit; color: inherit; font-weight: 500;
}
.journey-nav button.primary { background: var(--ink, #171916); color: var(--paper, #f7f8f3); border-color: var(--ink, #171916); }
.journey-nav button:hover { transform: translateY(-1px); }

.journey-error { color: #b73e22; font-size: 0.88rem; margin: 0; padding: 0.5rem 0.75rem; background: rgba(183,62,34,0.08); border-radius: 8px; }

.journey-summary { display: grid; gap: 0.75rem; background: #fff; border: 1px solid #e4dfd1; border-radius: 12px; padding: 1.5rem; }
.journey-summary-row { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid #f2f5ee; align-items: start; }
.journey-summary-row:last-of-type { border-bottom: none; }
.journey-summary-label { font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; color: #61665e; padding-top: 2px; }
.journey-summary-value { color: var(--ink, #171916); font-size: 0.98rem; line-height: 1.5; }
.journey-summary-badge { display: inline-block; padding: 0.15rem 0.5rem; background: rgba(169,111,67,0.12); color: var(--copper, #a96f43); border-radius: 6px; font-size: 0.75rem; margin-left: 0.5rem; }
.journey-summary-list { margin: 0; padding-left: 1.2rem; }
.journey-summary-empty { margin: 0; color: #9ca6a0; font-style: italic; }
.journey-summary-cta { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #f2f5ee; display: grid; gap: 0.75rem; }
.journey-summary-cta p { margin: 0; color: #4c5a50; font-size: 0.95rem; }
.journey-summary-cta button {
  justify-self: start; padding: 0.65rem 1.2rem; border-radius: 10px;
  background: var(--ink, #171916); color: var(--paper, #f7f8f3); border: 1px solid var(--ink, #171916);
  cursor: pointer; font: inherit;
}

/* Step 5 systems catalog — grouped by industry relevance */
.journey-systems-section { display: grid; gap: 0.6rem; margin-bottom: 1.25rem; }
.journey-systems-section-title { margin: 0; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: #61665e; font-weight: 600; }
/* Manual appointment field on the actions card — user types when they
   booked the Cal.com meeting so it gets included in the PDF report. */
.journey-appointment-field {
  display: grid; gap: 0.35rem; margin-top: 0.75rem;
  font-size: 0.85rem; color: #4c5a50;
}
.journey-appointment-field input {
  padding: 0.55rem 0.7rem; border: 1px solid #d8d8d2; border-radius: 8px;
  font: inherit; background: #fff; color: var(--ink, #171916);
}
.journey-appointment-field input:focus { outline: 2px solid var(--copper, #a96f43); outline-offset: 1px; }

/* Clickable flow-chart expand button — the whole mermaid canvas pops out
   into a new window when clicked (was previously the broken PDF button). */
.journey-flow-expand {
  display: block; width: 100%; background: transparent; border: 0; padding: 0;
  cursor: zoom-in; text-align: left; position: relative; border-radius: 12px;
  transition: box-shadow 150ms;
}
.journey-flow-expand:hover { box-shadow: 0 0 0 2px rgba(169,111,67,0.25); }
.journey-flow-expand .mermaid { width: 100%; }
.journey-flow-expand-hint {
  display: block; text-align: right; padding: 6px 8px 0;
  font-size: 0.75rem; color: var(--copper, #a96f43); font-weight: 500;
}

/* Use case summary: show both selected + typed */
.journey-summary-usecase { margin-bottom: 0.5rem; line-height: 1.5; font-size: 0.95rem; color: var(--ink); }
.journey-summary-usecase:last-child { margin-bottom: 0; }
.journey-summary-usecase strong { color: var(--copper, #a96f43); font-weight: 600; margin-right: 0.4rem; }

/* Auto-generated flow chart */
.journey-flow {
  background: #fff; border: 1px solid #e4dfd1; border-radius: 12px; padding: 1.5rem;
  margin-top: 1.5rem; display: grid; gap: 0.75rem;
}
.journey-flow-title { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.journey-flow-hint { margin: 0; color: #61665e; font-size: 0.85rem; line-height: 1.5; }
.journey-flow .mermaid { background: #fafbf8; border-radius: 8px; padding: 1rem; min-height: 200px; overflow-x: auto; text-align: center; }
.journey-flow .mermaid svg { max-width: 100%; height: auto; }

/* Post-resumen action cards */
.journey-actions { margin-top: 2rem; display: grid; gap: 1rem; }
.journey-actions-title { margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.journey-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.journey-action-card {
  background: #fff; border: 1px solid #e4dfd1; border-radius: 12px;
  padding: 1.5rem; display: grid; gap: 0.75rem; align-content: start;
}
.journey-action-card h4 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--ink); }
.journey-action-card p { margin: 0; color: #4c5a50; font-size: 0.9rem; line-height: 1.5; }
.journey-action-btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.journey-action-btn {
  display: inline-block; padding: 0.6rem 1rem; border-radius: 8px;
  background: #fafbf8; color: var(--ink, #171916); border: 1px solid #e4dfd1;
  text-decoration: none; font-weight: 500; cursor: pointer; font: inherit; text-align: center;
}
.journey-action-btn:hover { border-color: var(--copper, #a96f43); }
.journey-action-btn.primary { background: var(--ink, #171916); color: var(--paper, #f7f8f3); border-color: var(--ink, #171916); }
.journey-action-btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Paquete step */
.journey-step-optional {
  display: inline-block; padding: 0.1rem 0.5rem; margin-left: 0.4rem;
  background: rgba(169,111,67,0.14); color: var(--copper, #a96f43);
  border-radius: 999px; font-size: 0.62rem; letter-spacing: 0.1em;
  font-weight: 600; text-transform: uppercase; vertical-align: 2px;
}
.paquete-section { display: grid; gap: 0.8rem; margin-bottom: 2rem; }
.paquete-section:last-child { margin-bottom: 0; }
.paquete-section-title { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.paquete-section-hint { margin: 0; color: #4c5a50; font-size: 0.92rem; line-height: 1.5; }

.journey-card-key {
  display: inline-block; margin-top: 0.25rem; font-size: 0.7rem;
  background: #f2f5ee; padding: 0.1rem 0.4rem; border-radius: 4px; color: #61665e;
}

.paquete-compliance-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.paquete-compliance-label {
  margin: 0 0 0.5rem; font-size: 0.8rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 600;
}
.paquete-compliance-label-ok { color: #2e6b4a; }
.paquete-compliance-label-no { color: #b73e22; }

/* Summary paquete blocks */
.journey-summary-paquete { display: grid; gap: 0.75rem; }
.journey-summary-paquete-block { font-size: 0.92rem; line-height: 1.55; }
.journey-summary-paquete-block strong { display: block; margin-bottom: 0.3rem; font-weight: 600; }
.journey-summary-paquete-block code { background: #f2f5ee; padding: 0.05rem 0.35rem; border-radius: 3px; font-size: 0.85em; color: var(--ink); }

/* Nav layout — skip button on the right of next */
.journey-nav-right { display: flex; gap: 0.5rem; align-items: center; }
.journey-nav button.ghost { background: transparent; border-color: transparent; color: #61665e; }
.journey-nav button.ghost:hover { color: var(--ink); border-color: #e4dfd1; }

/* Step context breadcrumb — shows prev / current / next above active step */
.journey-step-context {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding: 0.6rem 0; margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border, #e4dfd1);
  font-size: 0.8rem;
}
.journey-step-context[hidden] { display: none; }
.step-ctx-prev, .step-ctx-next {
  color: var(--ink-muted, #61665e); white-space: nowrap; max-width: 30%;
  overflow: hidden; text-overflow: ellipsis;
}
.step-ctx-prev::before { content: "← "; }
.step-ctx-next::after  { content: " →"; }
.step-ctx-current {
  font-weight: 600; color: var(--ink, #171916);
  text-align: center; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.step-ctx-count {
  font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--copper, #a96f43);
  display: block; margin-bottom: 0.1rem; font-weight: 500;
}
