/* ============================================================
   O CÓDIGO DA NUTRIÇÃO — Design System
   Mobile-first. 3 fases de cor: tension → diagnostic → relief.
   ============================================================ */

:root {
  /* Fase 1 — Quiz / Tensão */
  --tension-bg: #FDF6EC;
  --tension-accent: #E8604C;
  --tension-alert: #D94F3D;
  --tension-progress: #E3B778;

  /* Fase 2 — Laudo / Diagnóstico */
  --diag-start: #D94F3D;
  --diag-end: #F2994A;

  /* Fase 3 — Mecanismo + Oferta / Alívio */
  --relief-start: #2F6E5E;
  --relief-end: #3E8E7E;
  --cta-start: #F2994A;
  --cta-end: #E8604C;

  /* Neutros */
  --ink: #2B2420;
  --ink-soft: #6B5F55;
  --paper: #FFFFFF;
  --line: #E9DFCF;
  --shadow: 0 8px 24px rgba(43, 36, 32, 0.10);
  --shadow-sm: 0 2px 8px rgba(43, 36, 32, 0.08);

  /* Tipografia */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --tap-min: 44px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--tension-bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .6s ease;
}

body.phase-relief { background: #FBF8F2; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

p { margin: 0 0 14px; color: var(--ink); }
.muted { color: var(--ink-soft); }

img { max-width: 100%; display: block; }

button { font-family: inherit; }

.container {
  max-width: 460px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ---------- App shell / screens ---------- */
#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 20px 0 100px;
  animation: fadeIn .35s ease;
}
.screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Progress trail (pegadas) ---------- */
.progress-trail {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--tension-bg);
  padding: 14px 20px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.trail-track {
  flex: 1;
  display: flex;
  gap: 4px;
}
.paw {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: var(--line);
  transition: background-color .35s ease, transform .2s ease;
}
.paw.lit {
  background: linear-gradient(90deg, var(--tension-accent), var(--tension-progress));
}
.trail-count {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
  min-width: 42px;
  text-align: right;
  font-weight: 700;
}
.dog-mood {
  width: 34px; height: 34px;
  flex-shrink: 0;
}

/* ---------- Question card ---------- */
.q-wrap { flex: 1; display: flex; flex-direction: column; }
.q-eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tension-accent);
  margin-bottom: 8px;
}
.q-title {
  font-size: 25px;
  margin-bottom: 22px;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}
.option-btn {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, transform .1s ease, background-color .15s ease;
  box-shadow: var(--shadow-sm);
}
.option-btn:active { transform: scale(0.98); }
.option-btn:hover, .option-btn:focus-visible {
  border-color: var(--tension-accent);
  outline: none;
}
.option-btn.selected {
  border-color: var(--tension-accent);
  background: #FFF1EC;
}

/* Collected chip animation */
.collected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--relief-start);
  background: #E7F2EE;
  border-radius: 999px;
  padding: 5px 12px;
  margin-top: 14px;
  align-self: flex-start;
  animation: popIn .3s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Break / info screens ---------- */
.break-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 18px;
}
.break-icon { font-size: 40px; }
.break-text {
  font-size: 19px;
  color: var(--ink);
  line-height: 1.5;
}

/* ---------- Buttons (generic) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 15px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
  width: 100%;
}
.btn:active { transform: scale(.98); }
.btn-tension {
  background: linear-gradient(135deg, var(--tension-accent), #F27D5F);
  color: #fff;
  box-shadow: 0 6px 18px rgba(232, 96, 76, .35);
}
.btn-relief {
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: #fff;
  box-shadow: 0 6px 18px rgba(232, 96, 76, .3);
}
.btn-ghost {
  background: transparent;
  border: 2px solid var(--line);
  color: var(--ink);
}

/* ---------- Loading screen ---------- */
.loading-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 28px;
  padding: 20px 0;
}
.gauge-wrap { width: 220px; }
.loading-msg {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  min-height: 48px;
}
.loading-dots span {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--tension-accent);
  margin: 0 3px;
  animation: bounce 1s infinite ease-in-out;
}
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* ---------- Diagnóstico ---------- */
.diag-header {
  text-align: center;
  padding: 28px 0 8px;
}
.stamp {
  display: inline-block;
  border: 2px solid var(--tension-alert);
  color: var(--tension-alert);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 6px;
  transform: rotate(-3deg);
  margin-bottom: 14px;
  animation: stampIn .4s cubic-bezier(.2,1.4,.4,1);
}
@keyframes stampIn {
  from { opacity: 0; transform: rotate(-3deg) scale(1.6); }
  to { opacity: 1; transform: rotate(-3deg) scale(1); }
}
.risk-score {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--diag-start), var(--diag-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.risk-label {
  font-weight: 800;
  font-size: 16px;
  color: var(--tension-alert);
  margin-top: 6px;
}
.laudo-text {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin: 18px 0;
  font-size: 16px;
}
.laudo-text p:last-child { margin-bottom: 0; }

/* ---------- Sales page sections ---------- */
.section {
  padding: 34px 0;
}
.section-relief {
  background: linear-gradient(180deg, var(--relief-start) 0%, var(--relief-end) 100%);
  color: #fff;
  border-radius: 24px 24px 0 0;
  margin-top: 10px;
}
.section-relief h2, .section-relief h3 { color: #fff; }
.section-relief p { color: rgba(255,255,255,.92); }

.gradient-block { margin-bottom: 24px; }
.gradient-block p { font-size: 16.5px; }
.gradient-eyebrow {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 6px;
}

.price-anchor-box {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius);
  padding: 18px;
  margin: 20px 0;
}

.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.step-item { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-family: var(--font-display);
}
.section:not(.section-relief) .step-num { background: #FFE8DF; color: var(--tension-accent); }

.qual-grid { display: flex; flex-direction: column; gap: 16px; }
.qual-card {
  background: rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 18px;
}
.qual-card.no { background: rgba(0,0,0,.15); }
.qual-card h4 { margin: 0 0 10px; font-family: var(--font-body); font-size: 15px; font-weight: 800; }
.qual-card ul { margin: 0; padding-left: 18px; }
.qual-card li { margin-bottom: 8px; font-size: 15px; }

/* ---------- Testimonials carousel ---------- */
.carousel {
  position: relative;
  margin: 0 -20px;
  padding: 0 20px;
}
.carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 78%;
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}
.carousel-slide img { width: 100%; height: auto; display: block; }
.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}
.carousel-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.9);
  color: var(--relief-start);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  font-size: 18px;
}
.section:not(.section-relief) .carousel-arrow { background: var(--paper); color: var(--tension-accent); }
.carousel-dots { display: flex; gap: 6px; }
.carousel-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  transition: background-color .2s, transform .2s;
}
.section:not(.section-relief) .carousel-dot { background: var(--line); }
.carousel-dot.active { background: #fff; transform: scale(1.3); }
.section:not(.section-relief) .carousel-dot.active { background: var(--tension-accent); }

/* ---------- Price stack ---------- */
.stack-cards { display: flex; flex-direction: column; gap: 8px; margin: 18px 0; }
.stack-card {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14.5px;
}
.stack-card .val { font-weight: 800; text-decoration: line-through; opacity: .75; }
.stack-total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 2px dashed rgba(255,255,255,.4);
  margin-top: 8px; padding-top: 12px;
  font-weight: 800; font-size: 16px;
}
.price-reveal {
  text-align: center;
  margin: 26px 0 10px;
}
.price-reveal .old { text-decoration: line-through; opacity: .7; font-size: 15px; }
.price-reveal .new {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  display: block;
  margin-top: 4px;
}
.price-reveal .sub { font-size: 13.5px; opacity: .85; }

/* ---------- FAQ accordion ---------- */
.faq-item {
  border-bottom: 1px solid rgba(255,255,255,.25);
  padding: 14px 0;
}
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15.5px;
  cursor: pointer;
  min-height: var(--tap-min);
}
.faq-q .icon { transition: transform .2s ease; flex-shrink: 0; font-size: 20px; }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  font-size: 15px;
  opacity: .92;
}
.faq-item.open .faq-a { max-height: 300px; padding-top: 10px; }

/* ---------- Guarantee ---------- */
.guarantee-box {
  display: flex;
  gap: 14px;
  align-items: center;
  background: rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 18px;
  margin: 22px 0;
}
.guarantee-box .seal { font-size: 34px; flex-shrink: 0; }

/* ---------- Sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(251,248,242,0) 0%, rgba(251,248,242,.98) 25%);
  display: none;
}
.sticky-cta.visible { display: block; }
.sticky-cta-inner { max-width: 460px; margin: 0 auto; }
.sticky-cta .btn { font-size: 16.5px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.hidden { display: none !important; }
.eyebrow-label {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--tension-accent);
  margin-bottom: 8px;
}

@media (min-width: 520px) {
  .container { max-width: 480px; }
  .carousel-slide { flex-basis: 60%; }
}
