/* =========================================================
   Santo Clique · landing page + formulário de orçamento
   Identidade: preto #000000 + branco #FFFFFF, Fredoka
   (700 no nome e títulos, 600 nos slogans e rótulos)
   Tela inicial e final em preto; perguntas em branco.
   ========================================================= */
:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #4d4d4d;
  --line: #000000;
  --soft: #f0f0f0;
  --ring: rgba(0, 0, 0, 0.14);
  --err: #c4001a;
  --font: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

body[data-theme="dark"] {
  --bg: #000000;
  --fg: #ffffff;
  --muted: #b3b3b3;
  --line: #ffffff;
  --soft: #1a1a1a;
  --ring: rgba(255, 255, 255, 0.22);
  --err: #ff7a8c;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.45s ease, color 0.45s ease;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Wordmark: "santo clique" com auréola sobre o "o" ---------- */
.wm {
  display: inline-block;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  padding-top: 0.18em;
}

.wm-o {
  position: relative;
  display: inline-block;
}

.wm-o svg {
  position: absolute;
  left: 50%;
  top: 0;
  width: 0.64em;
  height: 0.24em;
  transform: translate(-50%, -38%) rotate(-8deg);
  overflow: visible;
}

/* ---------- Barra de progresso ---------- */
#bar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--soft);
  z-index: 10;
  transition: opacity 0.3s ease;
}

#bar {
  height: 100%;
  width: 0;
  background: var(--fg);
  transition: width 0.45s var(--ease);
}

/* ---------- Header ---------- */
header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(96px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: opacity 0.3s ease, visibility 0.3s;
}

body.hero-active header,
body.hero-active #bar-wrap {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#logo {
  font-size: 26px;
}

#back {
  position: absolute;
  left: 20px;
  top: calc(26px + env(safe-area-inset-top, 0px));
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#back:hover {
  background: var(--fg);
  color: var(--bg);
  transform: translateX(-2px);
}

#back[disabled] {
  opacity: 0;
  pointer-events: none;
}

#counter {
  position: absolute;
  right: 24px;
  top: calc(38px + env(safe-area-inset-top, 0px));
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity 0.3s;
}

#counter.hide {
  opacity: 0;
}

/* ---------- Etapas ---------- */
#stage {
  position: absolute;
  inset: 0;
}

.step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-content: safe center;
  padding: calc(112px + env(safe-area-inset-top, 0px)) max(24px, calc(50% - 320px)) calc(48px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  opacity: 0;
  transform: translateY(28px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s var(--ease), visibility 0s 0.4s;
}

.step.prev {
  transform: translateY(-28px);
}

.step.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0.08s, 0.08s, 0s;
}

.q {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

/* ---------- Tela inicial ---------- */
.hero-step {
  padding: calc(40px + env(safe-area-inset-top, 0px)) max(24px, calc(50% - 600px)) calc(40px + env(safe-area-inset-bottom, 0px));
}

.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vh, 56px);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-top .wm {
  font-size: 30px;
}

.tag {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(44px, 6vw, 88px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-sub {
  margin: 0;
  max-width: 520px;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  text-wrap: pretty;
}

.svc {
  list-style: none;
  margin: 28px 0 32px;
  padding: 0;
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.svc li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
  border: 2px solid var(--line);
  border-radius: 20px;
}

.svc li.hl {
  background: var(--fg);
  color: var(--bg);
}

.svc .n {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  min-height: 2.3em;
}

.svc .p {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.svc .v {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.hero-art {
  display: flex;
  justify-content: flex-end;
}

.art {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  font-family: var(--font);
  overflow: visible;
}

/* Animação: o cursor clica no balão a cada 2,8s, a auréola flutua */
.art .clicker {
  transform-origin: 445px 150px;
  animation: press 2.8s var(--ease) infinite;
}

.art .bubble {
  transform-box: fill-box;
  transform-origin: center;
  animation: bubble 2.8s var(--ease) infinite;
}

.art .ripple {
  transform-box: fill-box;
  transform-origin: center;
  mix-blend-mode: difference;
  opacity: 0;
  animation: ripple 2.8s ease-out infinite;
}

.art .halo {
  animation: halo 2.8s ease-in-out infinite;
}

@keyframes press {
  0%, 30%, 52%, 100% { transform: none; }
  40% { transform: scale(0.9); }
}

@keyframes bubble {
  0%, 36%, 60%, 100% { transform: none; }
  44% { transform: scale(0.97); }
}

@keyframes ripple {
  0%, 39% { transform: scale(0.15); opacity: 0; }
  41% { opacity: 1; }
  80%, 100% { transform: scale(1.4); opacity: 0; }
}

@keyframes halo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ---------- Títulos e textos das perguntas ---------- */
h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.opt-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 4px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hint {
  margin: 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
}

.hint b {
  color: var(--fg);
  font-weight: 600;
}

/* ---------- Campo de texto ---------- */
.field {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 68px;
  margin-top: 28px;
  padding: 0 20px;
  border: 2.5px solid var(--line);
  border-radius: 18px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.field:focus-within {
  box-shadow: 0 0 0 5px var(--ring);
}

.field.bad {
  border-color: var(--err);
}

input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  outline: 0;
  font: inherit;
  font-size: 22px;
  font-weight: 500;
  color: var(--fg);
}

input::placeholder {
  color: #767676;
}

.cc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 14px;
  border-right: 2px solid var(--soft);
  font-size: 18px;
  font-weight: 600;
  height: 32px;
}

.cc.at {
  font-size: 22px;
  color: var(--muted);
}

.err {
  min-height: 22px;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--err);
}

/* ---------- Opções ---------- */
.opts {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 28px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 12px 18px;
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.opt .k {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  transition: inherit;
}

.opt .ot {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.opt small {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}

@media (hover: hover) {
  .opt:hover {
    background: var(--soft);
    transform: translateX(4px);
  }
}

.opt.sel,
.opt.sel:hover {
  background: var(--fg);
  color: var(--bg);
}

.opt.sel small {
  color: inherit;
  opacity: 0.8;
}

.opt.sel .k {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--bg);
}

/* ---------- Botões ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 180px;
  min-height: 56px;
  margin-top: 18px;
  padding: 0 30px;
  border: 2px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 -2px var(--ring);
  }
}

.btn:active {
  transform: scale(0.98);
}

.btn.load {
  pointer-events: none;
  color: transparent;
}

.btn.load::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2.5px solid var(--bg);
  border-top-color: transparent;
  border-radius: 50%;
  animation: sp 0.6s linear infinite;
}

.cta {
  margin-top: 0;
  min-height: 62px;
  padding: 0 34px;
  font-size: 20px;
  font-weight: 700;
  animation: ctaPulse 2.4s ease-out infinite;
}

@media (hover: hover) {
  .cta:hover {
    animation-play-state: paused;
  }
}

@keyframes ctaPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); }
}

.press {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

kbd {
  padding: 2px 7px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
}

@media (hover: none) {
  .press {
    display: none;
  }
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.privacy-note svg {
  flex: none;
}

/* ---------- Tela final ---------- */
.check {
  width: 76px;
  height: 76px;
  margin-bottom: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
}

.check svg {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
}

.step.on .check svg {
  animation: draw 0.6s 0.4s var(--ease) forwards;
}

.done h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
}

.done .hint {
  max-width: 480px;
  font-size: 19px;
  color: var(--fg);
}

.done-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 14px;
}

.done-actions .btn {
  margin-top: 10px;
}

.link {
  color: var(--fg);
  font-size: 16px;
  font-weight: 500;
  text-underline-offset: 4px;
}

/* ---------- Animações auxiliares ---------- */
.shake {
  animation: sh 0.35s;
}

@keyframes sp {
  to { transform: rotate(360deg); }
}

@keyframes sh {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

:focus-visible {
  outline: 3px solid var(--fg);
  outline-offset: 3px;
}

input:focus-visible {
  outline: none;
}

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  .hero-step {
    justify-content: flex-start;
  }

  .hero {
    gap: 20px;
  }

  .hero-top .wm {
    font-size: 24px;
  }

  .tag {
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-art {
    order: -1;
    justify-content: center;
  }

  .art {
    width: min(78vw, 380px);
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 64px);
  }

  .svc {
    gap: 8px;
    margin: 24px 0 28px;
  }

  .svc li {
    padding: 12px 12px 14px;
    border-radius: 16px;
  }

  .svc .n {
    font-size: 14px;
  }

  .svc .p {
    font-size: 9.5px;
    letter-spacing: 0.08em;
  }

  .svc .v {
    font-size: clamp(17px, 5.2vw, 24px);
  }

  .cta {
    width: 100%;
  }
}

@media (max-width: 480px) {
  header {
    height: calc(84px + env(safe-area-inset-top, 0px));
  }

  #logo {
    font-size: 22px;
  }

  #back {
    top: calc(20px + env(safe-area-inset-top, 0px));
  }

  #counter {
    display: none;
  }

  .step:not(.hero-step) {
    padding-top: calc(100px + env(safe-area-inset-top, 0px));
  }

  input {
    font-size: 20px;
  }

  .opt {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
