/* ==========================================================================
   Escola3 — Curso de Reiki — Fluxo cadastro -> agenda -> checkout (Hotmart)
   Paleta herdada de reiki/index.html
   ========================================================================== */

:root {
  --bg: #FDF9F4;
  --bg-alt: #F7F1FF;
  --bg-deep: #4A3D96;
  --ink: #2E2545;
  --ink-soft: #5B5270;
  --ink-muted: #8E84A3;
  --primary: #8B7FD9;
  --primary-dark: #6656C4;
  --primary-darker: #4A3D96;
  --accent: #7AC77A;
  --accent-dark: #5DA85D;
  --gold: #E8B94B;
  --white: #FFFFFF;
  --line: rgba(46, 37, 69, 0.12);
  --line-soft: rgba(46, 37, 69, 0.07);
  --ok: #5DA85D;
  --err: #B4402B;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --shadow-soft: 0 20px 60px -25px rgba(74, 61, 150, 0.35);
  --shadow-tight: 0 8px 24px -12px rgba(74, 61, 150, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Topo ---------- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: var(--primary-darker);
  color: #F3EEFB;
}
.top-bar .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
}
.top-bar .brand img {
  width: 40px;
  height: 40px;
  background: var(--bg);
  border-radius: 50%;
  padding: 4px;
  box-shadow: 0 2px 8px -3px rgba(0, 0, 0, 0.35);
  object-fit: contain;
}
.top-bar .brand strong { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.top-bar .brand span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.75;
}
.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.85;
}
.secure-badge svg { width: 16px; height: 16px; }

/* ---------- Progresso ---------- */
.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1.4rem 1rem 0.4rem;
  max-width: 640px;
  margin-inline: auto;
}
.progress .step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.progress .step .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  background: var(--line);
  color: var(--ink-soft);
}
.progress .step.active { color: var(--primary-dark); }
.progress .step.active .dot { background: var(--primary); color: #fff; }
.progress .step.done { color: var(--accent-dark); }
.progress .step.done .dot { background: var(--accent); color: #fff; }
.progress .sep { width: 26px; height: 2px; background: var(--line); border-radius: 2px; }

/* ---------- Layout ---------- */
.wrap {
  max-width: 560px;
  margin: 1.5rem auto 4rem;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}
.wrap.wide { max-width: 940px; }
.card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 5vw, 2.6rem);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary-dark);
  margin-bottom: 0.8rem;
}
.eyebrow svg { width: 15px; height: 15px; }
.section-title { font-size: clamp(1.5rem, 4.5vw, 2rem); color: var(--ink); }
.section-sub { margin-top: 0.6rem; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Formulario ---------- */
form { margin-top: 1.6rem; }
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.field input, .field select {
  width: 100%;
  padding: 0.85rem 0.95rem;
  font: inherit;
  color: var(--ink);
  background: #FBF8FF;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.field input::placeholder { color: #B4ACC7; }

/* ---------- Escolha do curso ---------- */
.curso-options {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
}
.curso-option {
  position: relative;
  display: block;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem 0.9rem 3rem;
  background: #FBF8FF;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.curso-option:hover { border-color: var(--primary); }
.curso-option input {
  position: absolute;
  left: 1rem;
  top: 1.15rem;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.curso-option.selected {
  border-color: var(--primary);
  background: var(--bg-alt);
}
.curso-option .curso-nome {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.98rem;
}
.curso-option .curso-preco {
  font-weight: 700;
  color: var(--primary-dark);
  margin-left: 0.4rem;
}
.curso-option .curso-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.12rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  vertical-align: middle;
}
.curso-option .curso-desc {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.curso-aviso {
  display: none;
  margin-top: 0.5rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  background: #FCF3E5;
  color: #8A6D3B;
  border: 1px solid #EAD9B8;
}
.curso-aviso.show { display: block; }

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 999px;
  box-shadow: var(--shadow-tight);
  transition: transform 0.12s, opacity 0.15s, filter 0.15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }
.btn-ghost {
  background: transparent;
  color: var(--primary-dark);
  box-shadow: none;
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: var(--bg-alt); }

.fine-note {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.fine-note svg { width: 15px; height: 15px; flex-shrink: 0; }

.msg {
  display: none;
  margin: 0.4rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  background: #FBE2E2;
  color: var(--err);
  border: 1px solid #F0C0C0;
}
.msg.show { display: block; }

/* ---------- Estados ---------- */
.state-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-align: center;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(139, 127, 217, 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Calendario ---------- */
.cal { margin-top: 1.4rem; }
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.cal-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.cal-title::first-letter { text-transform: uppercase; }
.cal-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: var(--bg-alt);
  color: var(--primary-dark);
}
.cal-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-muted);
  padding: 0.3rem 0;
  text-transform: uppercase;
}
.cal-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
}
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.avail {
  background: var(--bg-alt);
  color: var(--primary-dark);
  font-weight: 700;
}
.cal-day.avail:hover { background: #E9E2FA; }
.cal-day.selected { background: var(--primary); color: #fff; }
.cal-day:disabled { cursor: default; }
.cal-hint {
  margin-top: 0.8rem;
  font-size: 0.83rem;
  color: var(--ink-muted);
  text-align: center;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0 1.4rem;
}
.time-btn {
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--bg-alt);
  border: 1.5px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.time-btn:hover { background: #E9E2FA; }
.time-btn.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-darker);
}

/* ---------- Checkout / resumo ---------- */
.slot-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.2rem 0 0.4rem;
  padding: 0.85rem 1rem;
  background: var(--bg-alt);
  border: 1px solid #DCD3F5;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
}
.slot-box svg { width: 18px; height: 18px; flex-shrink: 0; }
.slot-box a {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: underline;
}
.hold-timer {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
}
.hold-timer strong { color: var(--accent-dark); }

.included {
  margin: 1.4rem 0;
  padding: 1.2rem 1.3rem;
  background: #FAF6FF;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.included h3 { font-size: 1rem; margin-bottom: 0.7rem; }
.included li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.32rem 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.included li svg { width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; }

.hotmart-slot { margin-top: 1.6rem; }
.hotmart-embed {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #FBF8FF;
  min-height: 520px;
}
.hotmart-embed iframe {
  width: 100%;
  height: 1180px;
  border: 0;
  display: block;
}
.hotmart-embed-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.hotmart-fallback {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
}
.hotmart-fallback a { color: var(--primary-dark); font-weight: 600; text-decoration: underline; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
}
.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}
.trust-row svg { width: 15px; height: 15px; }

/* ---------- Resultado / rodape ---------- */
.result { display: none; text-align: center; padding: 1rem 0; }
.result.show { display: block; }
.result .icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--bg-alt);
  display: grid;
  place-items: center;
}
.result .icon-wrap svg { width: 32px; height: 32px; }
.result h2 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.result p { color: var(--ink-soft); font-size: 0.95rem; }

.page-foot {
  text-align: center;
  padding: 1.5rem 1rem 3rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.page-foot a { color: var(--primary-dark); font-weight: 600; }

@media (max-width: 620px) {
  .wrap.wide { max-width: 560px; }
}
