/* Platform pages (Joshua / Klubora / FiboChat) — approved option 3 "Tour guiado".
   Type scale 96 / 32 / 19 / 14 / 12. The dark tour is the one bold surface: steps scroll
   on the left while one sticky product screen (radius 24) swaps on the right.
   Progressive enhancement: plataforma.js adds .tour--live; without it (no JS, or < 900px)
   every step shows its own capture inline, stacked. Engineering on paper, bridge on paper-2. */
.page-plataforma {
  --t1: var(--fs-96);
  --t2: var(--fs-32);
  --t3: var(--fs-19);
  --t4: var(--fs-14);
  --t5: var(--fs-12);
  --frame-radius: var(--r-lg);
}

/* ---------- tour ---------- */
.tour { padding-bottom: var(--sp-64); }
.tour-steps { max-width: var(--container-narrow); }
.tour-stage { display: none; }

/* intro (hero) */
.step-intro { padding-top: var(--sp-48); }
.crumb { display: flex; flex-wrap: wrap; gap: var(--sp-8); font-size: var(--t4); color: var(--on-dark-60); }
.crumb li + li::before { content: "/"; margin-right: var(--sp-8); }
.crumb a:hover { color: var(--on-dark); }
.tour h1 { font-size: var(--t1); font-weight: 300; line-height: 1; letter-spacing: -0.04em; margin-top: var(--sp-24); }
.intro-what { font-size: var(--t3); font-weight: 300; line-height: 1.5; color: var(--on-dark-70); margin-top: var(--sp-24); }
.intro-what strong { font-weight: 400; color: var(--on-dark); }
.intro-meta { margin-top: var(--sp-40); display: grid; gap: var(--sp-12); font-size: var(--t4); color: var(--on-dark-70); }
.intro-meta a { justify-self: start; color: var(--on-dark); border-bottom: 1px solid var(--on-dark-line); padding-bottom: 2px; }
.intro-meta a:hover { border-color: var(--on-dark); }
.intro-origin {
  margin-top: var(--sp-24); padding: var(--sp-16) var(--sp-20);
  background: var(--on-dark-06); border-radius: var(--r-md);
  font-size: var(--t4); color: var(--on-dark-70);
}
.intro-origin b { color: var(--on-dark); }
.intro-hint { margin-top: var(--sp-48); font-size: var(--t4); color: var(--on-dark-60); }

/* steps */
.steps-list { display: grid; }
.steps-list > li + li .step, .steps-list > li:first-child .step { padding-top: var(--sp-64); }
.step-name { font-size: var(--t4); color: var(--gold-soft); transition: color var(--dur) ease; }
.step h2 { font-size: var(--t2); font-weight: 300; line-height: 1.18; letter-spacing: -0.02em; margin-top: var(--sp-12); }
.step h2:focus { outline: none; }
.step .lede { font-size: var(--t3); font-weight: 300; line-height: 1.5; color: var(--on-dark-70); margin-top: var(--sp-20); }
.step-points { margin-top: var(--sp-28); display: grid; }
.step-points li { font-size: var(--t4); color: var(--on-dark-70); padding: var(--sp-10) 0; border-top: 1px solid var(--on-dark-line); }
.step-points li b { color: var(--on-dark); font-weight: 500; }

/* inline capture (mobile / no JS) */
.step-shot { margin-top: var(--sp-32); }
.step-shot .screen:not(.screen--phone) { background: var(--paper); } /* phones keep their ink bezel */
.step-shot--phone .screen--phone { max-width: 240px; margin-inline: auto; }
.step-shot--illus .illus { border-radius: var(--frame-radius); }

/* ---------- sticky stage (desktop, JS) ---------- */
.stage {
  position: sticky;
  top: max(var(--sp-24), calc(50vh - 290px));
  margin-top: var(--sp-24);
  display: flex; flex-direction: column; gap: var(--sp-12);
}
.rail { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.marker {
  border: 0; background: transparent; color: var(--on-dark-70);
  font-family: var(--sans); font-size: var(--t4); line-height: 1.3;
  padding: var(--sp-8) var(--sp-12); border-radius: var(--r-md);
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}
.marker:hover { background: var(--on-dark-06); color: var(--on-dark); }
.marker[aria-current="step"] { background: var(--gold); color: var(--ink); font-weight: 500; }
.marker:focus-visible { border-radius: var(--r-md); }

.stage-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--frame-radius);
  background: var(--paper);
  overflow: hidden;
}
.shot {
  position: absolute; inset: 0;
  border-radius: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
}
.shot.is-on { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease); }
.shot.screen .screen__img { height: 100%; }
.shot--phone {
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2); padding: var(--sp-20);
}
.shot--phone .screen--phone { height: 100%; max-width: none; }
.shot--phone .screen__img { width: auto; height: 100%; }
.shot--illus .illus { height: 100%; }
.cap { display: flex; justify-content: space-between; gap: var(--sp-16); font-size: var(--t5); color: var(--on-dark-60); padding: 0 var(--sp-4); }

@media (min-width: 900px) {
  .tour--live .tour-grid {
    display: grid;
    grid-template-columns: minmax(0, 424fr) minmax(0, 712fr);
    gap: var(--sp-48);
    align-items: stretch;
  }
  .tour--live .tour-steps { max-width: none; }
  .tour--live .tour-stage { display: block; }
  .tour--live .step-shot { display: none; }
  .tour--live .step {
    min-height: clamp(560px, 80vh, 760px);
    display: flex; flex-direction: column; justify-content: center;
    padding-block: var(--sp-48);
    opacity: 0.32;
    transition: opacity 0.35s var(--ease);
  }
  .tour--live .step.is-on { opacity: 1; }
  .tour--live .step:not(.is-on) .step-name { color: var(--on-dark-60); }
  .tour--live .step-intro { min-height: 600px; justify-content: flex-start; padding-top: var(--sp-64); opacity: 1; }
}

/* ---------- illustrative coded scenes (no product capture exists) ---------- */
.illus {
  background: var(--paper); color: var(--ink);
  padding: var(--sp-20) var(--sp-24);
  display: flex; flex-direction: column; gap: var(--sp-10);
  font-size: var(--t5); line-height: 1.45;
}
.illus-label { color: var(--ink-60); }
.illus-h { font-weight: 600; margin-bottom: var(--sp-4); }
.illus-box { background: var(--paper-2); border-radius: var(--r-md); padding: var(--sp-12) var(--sp-14); }
.illus-note { background: var(--gold-tint); border-radius: var(--r-md); padding: var(--sp-12) var(--sp-14); }
.illus-list { display: grid; gap: var(--sp-4); color: var(--ink-60); }
.illus-list li::before { content: "– "; }
.msg-u { align-self: flex-end; max-width: 90%; background: var(--paper-3); border-radius: var(--r-md) var(--r-md) var(--r-xs) var(--r-md); padding: var(--sp-8) var(--sp-12); }
.msg-a { align-self: flex-start; max-width: 90%; background: var(--paper-2); border-radius: var(--r-md) var(--r-md) var(--r-md) var(--r-xs); padding: var(--sp-8) var(--sp-12); }
.msg-out { align-self: flex-end; background: var(--teal-tint); border-radius: var(--r-md) var(--r-md) var(--r-xs) var(--r-md); }
.msg-in {
  align-self: flex-start; display: inline-flex; align-items: center; gap: var(--sp-12);
  background: var(--paper-2); border-radius: var(--r-md) var(--r-md) var(--r-md) var(--r-xs);
  padding: var(--sp-10) var(--sp-14); color: var(--ink-60);
}
.wave { display: inline-flex; align-items: center; gap: 3px; height: 24px; }
.wave i { display: block; width: 3px; height: var(--h); border-radius: var(--r-pill); background: var(--teal-500); }
.code {
  margin: 0; background: var(--ink); color: var(--on-dark-82);
  border-radius: var(--r-md); padding: var(--sp-12) var(--sp-14);
  font-family: var(--mono); font-size: var(--t5); line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.code .k { color: var(--gold-soft); }
.code .s { color: var(--on-dark); }
.code .c { color: var(--on-dark-60); }

/* ---------- engineering (paper) ---------- */
.eng {
  padding-block: var(--section-space);
  display: grid; grid-template-columns: minmax(0, 424fr) minmax(0, 712fr); gap: var(--sp-48);
}
.eng h2, .bridge h2 { font-size: var(--t2); font-weight: 300; line-height: 1.18; letter-spacing: -0.02em; }
.eng .intro, .bridge .intro { margin-top: var(--sp-20); color: var(--ink-60); max-width: 380px; }
.stack { margin-top: var(--sp-32); color: var(--ink-60); }
.eng-more { margin-top: var(--sp-24); }
.facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--sp-48); }
.fact { padding: var(--sp-20) 0; border-top: 1px solid var(--line); }
.fact dt { font-size: var(--t3); font-weight: 400; line-height: 1.35; }
.fact dd { margin-top: var(--sp-6); color: var(--ink-60); }

/* ---------- bridge to custom development + CTA ---------- */
.bridge-band { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.bridge {
  padding-block: var(--sp-96);
  display: grid; grid-template-columns: minmax(0, 424fr) minmax(0, 712fr); gap: var(--sp-48);
}
.svc-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--sp-48); }
.svc { padding: var(--sp-18) 0 var(--sp-20); border-top: 1px solid var(--line); }
.svc h3 { font-size: var(--t3); font-weight: 400; line-height: 1.35; }
.svc h3 a:hover { color: var(--teal-700); }
.svc p { margin-top: var(--sp-6); color: var(--ink-60); }
.others { margin-top: var(--sp-20); color: var(--ink-60); max-width: 420px; }
.others a { color: var(--ink); border-bottom: 1px solid var(--line); }
.others a:hover { border-color: var(--ink); }
.cta-row {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-32);
  margin-top: var(--sp-40); padding-top: var(--sp-32); border-top: 1px solid var(--line);
}
.cta-row p { color: var(--ink-60); max-width: 520px; }

/* ---------- responsive ---------- */
@media (max-width: 899px) {
  .eng, .bridge { grid-template-columns: 1fr; gap: var(--sp-40); }
  .bridge { padding-block: var(--section-space); }
  /* the grid gap already separates the CTA from the last service item */
  .cta-row { flex-direction: column; align-items: flex-start; gap: var(--sp-20); margin-top: 0; }
  /* the long contextual label must wrap on narrow screens */
  .cta-row .btn { white-space: normal; text-align: left; }
}
@media (max-width: 640px) {
  .facts, .svc-list { grid-template-columns: 1fr; }
  .illus { padding: var(--sp-16); }
}

