/* ============================================================
   PERCURSO FERENCZI — COMPONENTES
   ============================================================ */

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--f-serif);
  font-size: var(--t-lead);
  letter-spacing: var(--ls-lead);
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s var(--ease),
              color 0.22s var(--ease),
              transform 0.22s var(--ease),
              box-shadow 0.22s var(--ease);
}

.btn--primary {
  background: var(--c-red);
  color: #fff;
  padding: 0.85em 1.4em;
}
.btn--primary:hover {
  background: var(--c-green);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -18px rgba(26, 122, 79, 0.75);
}

.btn--paper {
  background: var(--c-paper);
  color: var(--c-ink);
  padding: 0.85em 1.4em;
}
.btn--paper:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -20px rgba(0, 0, 0, 0.55);
}

.btn--block { width: 100%; }
.btn--sm { font-size: var(--t-body); letter-spacing: var(--ls-body); }

/* botão secundário (contorno) — ex.: perguntar no Instagram */
.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border: 1px solid var(--c-border-strong);
  padding: calc(0.85em - 1px) calc(1.4em - 1px);
}
.btn--ghost:hover { border-color: var(--c-red); color: var(--c-red); }
.tela--dark .btn--ghost, .tela--red .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.tela--dark .btn--ghost:hover, .tela--red .btn--ghost:hover { border-color: #fff; color: #fff; }

.btn .btn__arrow { transition: transform 0.22s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* link editorial sublinhado */
.link-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  font-weight: 600;
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--c-red);
  padding-bottom: 0.15em;
  transition: color 0.2s var(--ease);
  cursor: pointer;
}
.link-cta:hover { color: var(--c-red); }
.link-cta .arrow { transition: transform 0.22s var(--ease); }
.link-cta:hover .arrow { transform: translateX(4px); }

/* ---------- Fecho de dobra (CTA primário em toda dobra) ---------- */

.dobra-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-6);
}
.dobra-cta__line {
  font-size: var(--t-h);
  line-height: var(--lh-h);
  letter-spacing: var(--ls-h);
  font-weight: 500;
  color: var(--c-ink);
  max-width: 26em;
}
.tela--dark .dobra-cta__line, .tela--red .dobra-cta__line { color: #fff; }

/* ---------- Ponto verde "ao vivo" ---------- */

.live-dot {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--c-green);
  margin-right: 0.45em;
  animation: livepulse 2s infinite;
  vertical-align: baseline;
}
@keyframes livepulse {
  0%   { box-shadow: 0 0 0 0 rgba(26, 122, 79, 0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(26, 122, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 122, 79, 0); }
}
/* dot verde mais luminoso, para sobre fundos escuros/coloridos */
.live-dot--bright {
  background: var(--c-green-on-dark);
  animation-name: livepulse-bright;
}
@keyframes livepulse-bright {
  0%   { box-shadow: 0 0 0 0 rgba(76, 195, 138, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(76, 195, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 195, 138, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---------- Placeholder de imagem (com dimensão indicada) ---------- */

.photo {
  position: relative;
  background: var(--c-paper);
  border: 1px solid var(--c-border-strong);
  padding: 7px;
  box-shadow: var(--shadow-lift);
}

.photo__slot {
  position: relative;
  background:
    repeating-linear-gradient(45deg,
      transparent 0 10px, rgba(22, 18, 10, 0.03) 10px 11px),
    #E4E0D4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
}

/* imagem real (substitui o placeholder mantendo a moldura .photo) */
.photo__img {
  display: block;
  width: 100%;
  height: auto;
}

.photo__label {
  font-size: var(--t-cap);
  line-height: var(--lh-cap);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-faint);
  text-align: center;
  padding-inline: var(--sp-3);
}

/* dimensão do asset a produzir */
.photo__dim {
  font-size: var(--t-cap);
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--c-muted);
  border: 1px dashed var(--c-border-strong);
  padding: 0.3em 0.7em;
}

/* nome do arquivo a colocar na pasta img/ */
.photo__file {
  font-size: var(--t-cap);
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--c-red);
  background: color-mix(in srgb, var(--c-red) 12%, transparent);
  padding: 0.25em 0.6em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* placeholder sobre superfície escura (ex.: manifesto do mapa) */
.photo--dark { background: var(--c-dark-2); border-color: var(--c-dark-border); }
.photo--dark .photo__slot {
  background:
    repeating-linear-gradient(45deg,
      transparent 0 10px, rgba(255, 255, 255, 0.03) 10px 11px),
    #241F18;
}
.photo--dark .photo__label { color: var(--c-muted-on-dark); }
.photo--dark .photo__dim { color: var(--c-muted-on-dark); border-color: var(--c-dark-border); }

/* ---------- Lista expansível (livros / cursos) ---------- */

.xcol__label {
  font-size: var(--t-cap);
  line-height: var(--lh-cap);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--c-muted);
  margin-bottom: var(--sp-2);
}

.xitem { border-bottom: 1px solid var(--c-border); }
.xitem:first-of-type { border-top: 2px solid var(--c-ink); }

.xitem__head {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: 0.8em;
  text-align: left;
  cursor: pointer;
}

.xitem__title {
  font-size: var(--t-body);
  letter-spacing: var(--ls-body);
  font-weight: 500;
  color: var(--c-ink);
  transition: color 0.2s var(--ease);
}
.xitem:hover .xitem__title { color: var(--c-red); }

.xitem__toggle {
  color: var(--c-red);
  font-size: var(--t-lead);
  line-height: 1;
  flex: 0 0 auto;
  transition: transform 0.25s var(--ease);
}
.xitem:hover .xitem__toggle,
.xitem.is-open .xitem__toggle { transform: rotate(45deg); }

.xitem__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
}
.xitem:hover .xitem__body,
.xitem.is-open .xitem__body { grid-template-rows: 1fr; }

.xitem__inner { overflow: hidden; }

.xitem__content {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
}
.xitem__content .photo { padding: 4px; box-shadow: none; }
.xitem__content .photo__slot { aspect-ratio: 3 / 4; }
/* thumbs quadradas (cursos) */
.xitem__content--sq .photo__slot { aspect-ratio: 1 / 1; }
.xitem__content .photo__slot { gap: 0.25em; }
.xitem__content .photo__dim { font-size: 0.5rem; padding: 0.15em 0.4em; }
.xitem__content .photo__file { font-size: 0.5rem; padding: 0.15em 0.4em; word-break: break-all; text-align: center; }

.xitem__desc { font-size: var(--t-body); color: var(--c-muted); }
.xitem__desc a {
  display: inline-block;
  color: var(--c-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--c-red);
  text-underline-offset: 0.2em;
}
.xitem__desc a:hover { color: var(--c-red); }

/* selo de menção honrosa (livro sobre Ferenczi) */
.xitem__hono {
  display: inline-block;
  background: var(--c-red);
  color: #fff;
  font-size: var(--t-cap);
  line-height: var(--lh-cap);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.2em 0.6em;
  margin-left: 0.6em;
  vertical-align: middle;
}

.xcol__more { margin-top: var(--sp-3); }

/* ---------- Placeholder de copy ---------- */

.ph {
  border: 1px dashed var(--c-border-strong);
  padding: var(--sp-2) var(--sp-3);
  color: var(--c-faint);
  font-style: italic;
  max-width: 36em;
}
.ph--dark { border-color: var(--c-dark-border); color: var(--c-muted-on-dark); }

/* ---------- Revelação sutil ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Barra CTA mobile ---------- */

.mobcta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  background: var(--c-dark);
  color: var(--c-cream-on-dark);
  padding: 0.7rem var(--grid-margin);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease);
}
.mobcta.is-shown { transform: none; }
.mobcta__info { line-height: 1.3; }
.mobcta__label { display: block; font-size: var(--t-cap); letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted-on-dark); }
.mobcta__price { font-weight: 600; color: #fff; }
@media (max-width: 860px) {
  .mobcta { display: flex; }
  body { padding-bottom: 4.5rem; }
}

/* ---------- Voltar ao topo ---------- */

.totop {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2vw, 28px);
  z-index: 140;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: var(--c-ink);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.2s;
}
.totop.is-shown { opacity: 1; pointer-events: auto; transform: none; }
.totop:hover { background: var(--c-red); }
@media (max-width: 860px) { .totop { bottom: 5.2rem; } }

/* ---------- Breadcrumb lateral (sutil) ---------- */

.bcrumb {
  position: fixed;
  right: clamp(10px, 1.4vw, 22px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 130;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (max-width: 1280px) { .bcrumb { display: none; } }

.bcrumb a {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-border-strong);
  transition: background-color 0.2s, transform 0.2s;
}
.bcrumb a:hover { transform: scale(1.35); }
.bcrumb a.is-active { background: var(--c-red); }

.bcrumb a span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--c-ink);
  color: #fff;
  font-size: var(--t-cap);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.35em 0.7em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
/* dobra ativa: nome sempre visível ao lado do ponto */
.bcrumb a.is-active span { opacity: 1; background: var(--c-red); }
/* hover no trilho: todos os nomes aparecem para navegar */
.bcrumb:hover a span { opacity: 1; }

/* ---------- Modal "Como você quer atravessar?" ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3);
}
.modal.is-open { display: flex; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 17, 9, 0.66);
  backdrop-filter: blur(2px);
}

.modal__panel {
  position: relative;
  width: min(38rem, 100%);
  max-height: min(92vh, 100%);
  overflow-y: auto;
  background: var(--c-paper);
  box-shadow: var(--shadow-panel);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.modal__panel--wide { width: min(48rem, 100%); }

.modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border-strong);
  color: var(--c-muted);
  font-size: 1rem;
}
.modal__close:hover { color: var(--c-red); border-color: var(--c-red); }

.modal__eyebrow {
  font-size: var(--t-cap);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--c-red);
  margin-bottom: var(--sp-2);
}

.modal__title {
  font-size: var(--t-d3);
  line-height: var(--lh-d3);
  letter-spacing: var(--ls-d3);
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: var(--sp-2);
}

.modal__sub { color: var(--c-muted); margin-bottom: var(--sp-4); max-width: 30em; }

/* card preto do percurso completo */
.modal__full {
  background: var(--c-dark);
  color: var(--c-cream-on-dark);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: var(--sp-4);
}

.modal__full-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.modal__badge {
  display: inline-block;
  background: var(--c-red);
  color: #fff;
  font-size: var(--t-cap);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.4em 0.8em;
}

.modal__full-name {
  font-size: var(--t-d3);
  line-height: var(--lh-d3);
  letter-spacing: var(--ls-d3);
  font-weight: 600;
  color: #fff;
}

.modal__full-meta { color: var(--c-muted-on-dark); font-size: var(--t-body); margin-top: 0.2em; }

.modal__price { text-align: right; line-height: 1.1; }
.modal__price s { display: block; color: var(--c-muted-on-dark); font-size: var(--t-body); }
.modal__price b {
  font-size: var(--t-d3);
  letter-spacing: var(--ls-d3);
  font-weight: 700;
  color: #fff;
}

/* economia em evidência (verde) */
.modal__econ {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin: var(--sp-3) 0;
}
.modal__save {
  background: var(--c-green);
  color: #fff;
  font-size: var(--t-cap);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.35em 0.7em;
}
.modal__perk { color: var(--c-green-on-dark); font-size: var(--t-body); font-weight: 600; }

/* divisor "ou um módulo avulso" */
.modal__divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  color: var(--c-muted);
  font-size: var(--t-cap);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.modal__divider::before, .modal__divider::after {
  content: "";
  height: 1px;
  background: var(--c-border-strong);
  flex: 1;
}

/* linhas de módulo — cada uma é um link direto */
.modal__mods { display: grid; gap: 0.6rem; margin-bottom: var(--sp-4); }

.modal__mod {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  border: 1px solid var(--c-border-strong);
  background: #fff;
  padding: 1em 1.1em;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.modal__mod:hover {
  border-color: var(--c-red);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.modal__mod i {
  font-style: normal;
  font-size: var(--t-cap);
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--c-red);
  min-width: 2em;
}

.modal__mod b {
  flex: 1;
  font-weight: 600;
  font-size: var(--t-body);
  color: var(--c-ink);
}

.modal__mod em {
  font-style: normal;
  color: var(--c-muted);
  white-space: nowrap;
}
.modal__mod:hover em { color: var(--c-red); }

.modal__assurance {
  font-size: var(--t-cap);
  line-height: var(--lh-cap);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  text-align: center;
}

/* ---------- Modal do cronograma ---------- */

.cron { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-4); }

.cron__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  border-top: 2px solid var(--c-ink);
  padding-top: var(--sp-2);
  margin-bottom: var(--sp-1);
}
.cron__head i {
  font-style: normal;
  font-weight: 700;
  color: var(--c-red);
  font-size: var(--t-body);
  min-width: 2em;
}
.cron__head h3 {
  flex: 1;
  font-size: var(--t-h);
  line-height: var(--lh-h);
  letter-spacing: var(--ls-h);
  font-weight: 600;
  color: var(--c-ink);
}
.cron__head span {
  font-size: var(--t-cap);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--c-faint);
  white-space: nowrap;
}

.cron__list { list-style: none; margin: 0; padding: 0; }

.cron__item {
  display: grid;
  grid-template-columns: 9em minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: baseline;
  padding-block: 0.55em;
  border-bottom: 1px solid var(--c-border);
}
.cron__item:last-child { border-bottom: 0; }

.cron__date { font-weight: 600; color: var(--c-ink); font-size: var(--t-body); }
.cron__txts { color: var(--c-muted); font-size: var(--t-body); }

.cron__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  border-top: 1px solid var(--c-border-strong);
  padding-top: var(--sp-3);
}
.cron__cta .modal__assurance { text-align: left; }

@media (max-width: 560px) {
  .cron__item { grid-template-columns: 1fr; gap: 0.1em; }
}
