/* ============================================================
   Guía del Contribuidor — EGO · estilos
   Cálido, amable, instructivo.
   ============================================================ */

:root {
  --bg: #faf4ec;
  --bg-deep: #f3e9dc;
  --surface: #fffdf9;
  --ink: #2c241b;
  --muted: #7b6e5e;
  --line: #eadcca;
  --accent: #d96e48;
  --accent-ink: #fff;
  --ok: #3e9b6b;
  --ok-soft: #e7f3ec;
  --bad: #c9503e;
  --bad-soft: #faeae6;
  --radius: 18px;
  --chat-w: 380px;
  --font-display: "Gabarito", sans-serif;
  --font-body: "Karla", sans-serif;
  --font-mono: "Spline Sans Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 500px at 85% -10%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); }
code { font-family: var(--font-mono); background: var(--bg-deep); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }

/* ---------- estructura ---------- */
.app { min-height: 100vh; }
.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 40px 80px;
}
@media (min-width: 1024px) {
  .content { margin-right: calc(var(--chat-w) + 56px); margin-left: auto; }
}

.sec { margin-top: 88px; }
.sec-head { margin-bottom: 28px; }
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.kicker-num {
  color: var(--accent);
  font-weight: 700;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  border-radius: 999px;
  padding: 2px 9px;
}
h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; }
.lead { color: var(--muted); font-size: 18px; margin-top: 12px; max-width: 56ch; }

/* ---------- hero ---------- */
.hero h1 {
  font-size: clamp(38px, 5.2vw, 60px);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 14px 0 18px;
}
.hero .lead { font-size: 19px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0; }
.store-btn {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--ink); color: #fff; text-decoration: none;
  padding: 11px 20px 12px; border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(44, 36, 27, 0.22); }
.store-kicker { font-size: 11px; opacity: 0.75; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.store-btn strong { font-family: var(--font-display); font-size: 16px; white-space: nowrap; }

.orgcode-card {
  background: var(--surface);
  border: 1.5px solid color-mix(in oklab, var(--accent) 45%, var(--line));
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 14px 34px -18px color-mix(in oklab, var(--accent) 35%, transparent);
}
.orgcode-label {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px; font-weight: 600;
}
.orgcode-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.orgcode { display: flex; gap: 6px; }
.orgcode span {
  font-family: var(--font-mono); font-weight: 700; font-size: 24px;
  background: var(--bg-deep); border-radius: 9px; padding: 6px 9px;
  border: 1px solid var(--line);
}
.orgcode-card p { color: var(--muted); font-size: 15.5px; }

/* ---------- botones / chips ---------- */
.btn {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  border-radius: 999px; border: 1.5px solid transparent;
  padding: 9px 20px; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.solid { background: var(--accent); color: var(--accent-ink); }
.btn.solid:hover:not(:disabled) { background: color-mix(in oklab, var(--accent) 88%, black); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn.tiny { font-size: 13px; padding: 5px 13px; }
.btn.small { font-size: 14px; padding: 7px 16px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 7px 15px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.small { font-size: 13px; padding: 5px 12px; font-weight: 500; }

/* ---------- tarjetas ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 12px 30px -22px rgba(44, 36, 27, 0.35);
}
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; }
.step-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; }
.step-card .step-n {
  width: 34px; height: 34px; border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 14%, white);
  color: var(--accent); font-family: var(--font-display); font-weight: 700;
  display: grid; place-items: center; font-size: 16px;
}
.step-card strong { font-family: var(--font-display); font-size: 17px; }
.step-card p { color: var(--muted); font-size: 15px; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.list-card h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mark {
  width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; flex: none;
}
.ok-mark { background: var(--ok-soft); color: var(--ok); }
.bad-mark { background: var(--bad-soft); color: var(--bad); }
.list-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.list-card li { padding-left: 18px; position: relative; font-size: 15.5px; color: #4a4136; }
.list-card.do li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 999px; background: var(--ok); }
.list-card.dont li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--bad); }
.task-list strong { font-family: var(--font-display); color: var(--ink); }

.target-card { border-left: 5px solid var(--ok); }
.target-list, .reject-list { margin: 0; padding: 0 0 0 2px; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.target-list li { padding-left: 30px; position: relative; }
.target-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--ok); font-weight: 700;
}
.reject-card { border-left: 5px solid var(--bad); }
.reject-list li { padding-left: 30px; position: relative; color: #4a4136; }
.reject-list li::before { content: "✕"; position: absolute; left: 0; color: var(--bad); font-weight: 700; }
.reject-note {
  margin-top: 20px; padding: 14px 16px; border-radius: 12px;
  background: var(--bad-soft); color: var(--bad); font-weight: 700;
  font-family: var(--font-display); font-size: 15.5px;
}

/* ---------- veredictos ---------- */
.verdict {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: 14px; padding: 14px 16px; margin-top: 18px;
  font-size: 15.5px; animation: pop-in 0.25s ease;
}
.verdict.ok { background: var(--ok-soft); }
.verdict.bad { background: var(--bad-soft); }
.verdict-dot { width: 10px; height: 10px; border-radius: 999px; margin-top: 6px; flex: none; }
.verdict.ok .verdict-dot { background: var(--ok); }
.verdict.bad .verdict-dot { background: var(--bad); }
.verdict.ok strong { color: var(--ok); }
.verdict.bad strong { color: var(--bad); }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- verificador ---------- */
.checker-row { margin-bottom: 18px; }
.field-label {
  display: block; font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 9px;
}
.checker-hint { color: var(--muted); font-size: 15px; }

/* ---------- checklist ---------- */
.checklist-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.progress-track { flex: 1; height: 10px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--ok); transition: width 0.3s ease; }
.progress-label { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.check-item {
  display: flex; gap: 12px; align-items: flex-start; width: 100%;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-body); font-size: 15.5px; color: var(--ink);
  padding: 9px 10px; border-radius: 12px; transition: background 0.15s;
}
.check-item:hover { background: var(--bg-deep); }
.check-box {
  width: 24px; height: 24px; border-radius: 8px; flex: none;
  border: 2px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
  transition: background 0.15s, border-color 0.15s; margin-top: -1px;
}
.check-item.checked .check-box { background: var(--ok); border-color: var(--ok); }
.check-item.checked span:last-child { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--muted) 50%, transparent); }
.checklist-foot { margin-top: 16px; color: var(--muted); font-size: 14.5px; display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }

/* ---------- quiz ---------- */
.quiz-meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.quiz-q { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-bottom: 18px; }
.quiz-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.quiz-btn { border-width: 2px; background: var(--surface); }
.quiz-btn.ok { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 45%, transparent); }
.quiz-btn.bad { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 45%, transparent); }
.quiz-btn.ok.reveal, .quiz-btn.ok.picked.reveal { background: var(--ok); border-color: var(--ok); color: #fff; opacity: 1; }
.quiz-btn.bad.reveal { background: var(--bad); border-color: var(--bad); color: #fff; opacity: 1; }
.quiz-next { margin-top: 10px; }
.quiz-result { text-align: center; padding: 16px 0; }
.quiz-score { font-family: var(--font-display); font-size: 56px; font-weight: 800; color: var(--accent); }
.quiz-score span { font-size: 26px; color: var(--muted); font-weight: 600; }
.quiz-result p { color: var(--muted); margin: 8px auto 18px; max-width: 40ch; }

/* ---------- faq ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.faq-item.open { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-size: 16.5px; font-weight: 600; color: var(--ink);
  padding: 16px 20px;
}
.faq-caret { color: var(--accent); font-size: 20px; font-weight: 700; flex: none; }
.faq-a { padding: 0 20px 18px; color: var(--muted); font-size: 15.5px; animation: pop-in 0.2s ease; }
.faq-more {
  margin-top: 22px; padding: 16px 20px; border-radius: 14px;
  background: color-mix(in oklab, var(--accent) 10%, white);
  border: 1px dashed color-mix(in oklab, var(--accent) 45%, transparent);
  font-size: 15.5px;
}

/* ---------- tutorial de la app ---------- */
.tut-intro { margin: 6px 0 26px; }
.tut-intro h3 {
  font-size: 19px; margin-bottom: 14px;
}
.tut-card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px;
}
.tut-title { display: flex; flex-direction: column; gap: 4px; }
.tut-count {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
}
.tut-title h3 { font-size: 20px; }
.tut-main {
  display: flex; gap: 18px; align-items: center; justify-content: center;
  background: var(--bg-deep);
  border-radius: 14px;
  padding: 18px;
  position: relative; overflow: hidden;
}
.tut-screen { position: relative; display: grid; place-items: center; min-height: 300px; flex: 1; }
.tut-screen img {
  max-width: 150px; max-height: 300px;
  width: auto; height: auto;
  border-radius: 14px;
  border: 4px solid var(--ink);
  box-shadow: 0 14px 32px -14px rgba(44, 36, 27, 0.5);
  animation: pop-in 0.25s ease;
}
.tut-screen.landscape img {
  max-width: 100%; max-height: 220px;
}
.tut-tabs {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 4px;
  box-shadow: 0 8px 20px -10px rgba(44, 36, 27, 0.35);
}
.tut-dots { display: flex; flex-direction: column; gap: 9px; flex: none; }
.tut-dot {
  width: 38px; height: 38px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface);
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px;
  color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.tut-dot:hover { border-color: var(--accent); color: var(--accent); }
.tut-dot.active {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  transform: scale(1.12);
}
.tut-dot.done { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.tut-desc { color: var(--muted); font-size: 15.5px; min-height: 3.2em; }
.tut-nav { justify-content: flex-end; display: flex; gap: 10px; }

/* celebración del último paso */
.tut-success {
  background: var(--ok-soft);
  border: 1.5px solid color-mix(in oklab, var(--ok) 35%, transparent);
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 15.5px;
  animation: pop-in 0.35s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.tut-success strong {
  color: var(--ok);
  font-family: var(--font-display); font-size: 17px; font-weight: 800;
  letter-spacing: 0.04em; margin-right: 4px;
}
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.confetti span {
  position: absolute; top: -14px;
  width: 8px; height: 13px; border-radius: 2px;
  opacity: 0;
  animation-name: confetti-fall;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}
.confetti span.round { width: 9px; height: 9px; border-radius: 999px; }
@keyframes confetti-fall {
  0% { opacity: 1; translate: 0 0; rotate: 0deg; }
  80% { opacity: 1; }
  100% { opacity: 0; translate: 12px 380px; rotate: 540deg; }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* ---------- botón de recorrido (CTA gamificado, salta por la pantalla) ---------- */
.journey-wrap {
  position: fixed; top: 0; left: 0; z-index: 60;
  transition: transform 1.1s cubic-bezier(0.34, 1.45, 0.45, 1), opacity 0.3s;
  will-change: transform;
}
.journey-wrap.hopping .journey-btn { animation: journey-squash 0.9s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes journey-squash {
  0% { transform: scale(1, 1) rotate(0deg); }
  25% { transform: scale(0.92, 1.1) rotate(-3deg); }
  55% { transform: scale(1.08, 0.9) rotate(2deg); }
  80% { transform: scale(0.98, 1.03) rotate(-1deg); }
  100% { transform: scale(1, 1) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .journey-wrap { transition: opacity 0.3s; }
  .journey-wrap.hopping .journey-btn { animation: none; }
}

/* asentado: quieto abajo, con un vaivén suave */
.journey-wrap.settled .journey-btn { animation: settle-bob 3.6s ease-in-out infinite; }
@keyframes settle-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}
@media (prefers-reduced-motion: reduce) { .journey-wrap.settled .journey-btn { animation: none; } }

.journey-bubble {
  position: absolute;
  background: color-mix(in oklab, var(--accent) 12%, var(--surface));
  color: var(--ink);
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid color-mix(in oklab, var(--accent) 35%, var(--line));
  box-shadow: 0 12px 28px -12px rgba(44, 36, 27, 0.45);
  white-space: nowrap;
  animation: bubble-pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1), bubble-float 2.4s ease-in-out 0.4s infinite;
}
/* burbujitas de cola, como pensamiento */
.journey-bubble::before, .journey-bubble::after {
  content: ""; position: absolute; border-radius: 50%;
  background: inherit;
  border: inherit;
}
/* debajo del botón (por defecto): cola apuntando hacia arriba */
.journey-bubble.below { top: calc(100% + 20px); left: 26px; }
.journey-bubble.below::before { width: 12px; height: 12px; top: -10px; left: 12px; }
.journey-bubble.below::after { width: 7px; height: 7px; top: -19px; left: 5px; }
/* encima del botón (cuando está abajo en la pantalla) */
.journey-bubble.above { bottom: calc(100% + 20px); left: 26px; }
.journey-bubble.above::before { width: 12px; height: 12px; bottom: -10px; left: 12px; }
.journey-bubble.above::after { width: 7px; height: 7px; bottom: -19px; left: 5px; }
@keyframes bubble-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.7); }
  to { opacity: 1; transform: none; }
}
@keyframes bubble-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) { .journey-bubble { animation: none; } }

.journey-btn {
  display: flex; align-items: center; gap: 9px;
  background: var(--ink); color: #fff;
  border: none; border-radius: 999px; cursor: pointer;
  padding: 6px 16px 6px 7px;
  font-family: var(--font-body);
  box-shadow: 0 14px 32px -12px rgba(44, 36, 27, 0.55);
  transition: transform 0.15s ease, background 0.3s ease, box-shadow 0.3s ease;
  animation: journey-idle 5s ease-in-out 3s infinite;
}
@keyframes journey-idle {
  0%, 88%, 100% { rotate: 0deg; }
  91% { rotate: -2.5deg; }
  94% { rotate: 2deg; }
  97% { rotate: -1deg; }
}
@media (prefers-reduced-motion: reduce) { .journey-btn { animation: none; } }
.journey-btn:hover { transform: translateY(-2px); }
.journey-btn:active { transform: scale(0.97); }
.journey-btn.done {
  background: var(--accent);
  box-shadow: 0 18px 44px -12px color-mix(in oklab, var(--accent) 75%, transparent);
}
.journey-ring { position: relative; width: 36px; height: 36px; flex: none; display: grid; place-items: center; }
.journey-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 3.5; }
.ring-fill {
  fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease, stroke 0.4s ease;
}
.journey-btn.done .ring-fill { stroke: #fff; }
.journey-core {
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  color: #fff;
  transition: color 0.4s ease;
}
.journey-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.journey-text strong { font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.journey-text em { font-style: normal; font-size: 11px; opacity: 0.75; }
.journey-arrow {
  width: 8px; height: 8px; flex: none; margin-left: 2px;
  border-top: 2.5px solid #fff; border-right: 2.5px solid #fff;
  transform: rotate(45deg);
  opacity: 0.85;
}
.journey-btn.done .journey-arrow { transform: rotate(45deg) translate(-1px, 1px); }

/* ---------- cierre final ---------- */
.endcap {
  margin: 0 0 22px;
  background: var(--ink); color: #fff;
  border-radius: var(--radius);
  padding: 40px 36px;
  display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
}
.endcap h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); }
.endcap p { color: rgba(255, 255, 255, 0.75); max-width: 50ch; }
.endcap code {
  background: rgba(255, 255, 255, 0.16);
  color: #ffd9a8;
  font-weight: 700;
  padding: 2px 8px;
}
.endcap .btn.solid { font-size: 17px; padding: 13px 30px; margin-top: 6px; text-decoration: none; display: inline-block; }

/* ---------- pie ---------- */
.page-foot { margin-top: 90px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; display: flex; flex-direction: column; gap: 8px; }
.page-foot .fine { font-size: 13px; }
