/* Quiz Turbina — identidade visual Turbina 2026 (mesma do turbina-v3).
   Creme + ciano, títulos marrons com destaque vermelho, laranja de apoio.
   Fontes: GC Kualine (títulos) + Poppins (corpo), servidas pelo próprio site. */

@font-face { font-family: "GC Kualine"; src: url("marca2026/fontes/gc-kualine.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "CS Blinky"; src: url("marca2026/fontes/cs-blinky.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("marca2026/fontes/poppins-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("marca2026/fontes/poppins-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("marca2026/fontes/poppins-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --cyan: #80ECFF;
  --cyan-hover: #5FE2FA;
  --orange: #FF9F1F;
  --brown: #5B3016;
  --red: #BF1700;
  --red-hover: #9E1300;
  --ink: #1E1913;

  --bg: #FFF8F0;
  --card: #FFFFFF;
  --card-sel: #EAF9FD;
  --text: #1E1913;
  --title: #5B3016;
  --hl: #BF1700;
  --muted: #5B4A3E;
  --line: rgba(91, 48, 22, 0.16);
  --line-strong: rgba(91, 48, 22, 0.34);
  --sel: #1E1913;
  --track: rgba(91, 48, 22, 0.12);
  --bar: #FF9F1F;
  --needle: #BF1700;
  --tick: rgba(91, 48, 22, 0.35);
  --shadow: 0 10px 30px -14px rgba(91, 48, 22, 0.28);
  --band: url("marca2026/mandala-ciana.png");

  --font-display: "GC Kualine", "Poppins", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;
  --radius: 20px;
  --tick-w: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}


* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--cyan); color: var(--ink); }
.hl { color: var(--hl); }

/* ---------- topo ---------- */
.topbar { position: relative; display: grid; justify-items: center; gap: 22px; padding: 22px 16px 0; }
.logo { width: 128px; height: auto; }
.back {
  position: absolute; left: 12px; top: 16px; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.back:hover { border-color: var(--line-strong); }
.back[hidden] { display: none; }
.progress { width: min(100%, 448px); height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.progress span {
  display: block; height: 100%; width: 100%; background: var(--bar); border-radius: inherit;
  transform-origin: left; transform: scaleX(0); transition: transform 0.5s var(--ease);
}

/* ---------- tela ---------- */
.screen {
  width: min(100%, 560px); margin: 0 auto; padding: 24px 16px 48px;
  min-height: calc(100dvh - 120px);
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
}
.screen.top { justify-content: flex-start; padding-top: 32px; }
.enter { animation: enter 0.45s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }

h1 {
  font-family: var(--font-display); font-weight: 700; color: var(--title);
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.1rem); line-height: 1.12; text-align: center; letter-spacing: -0.01em;
}
h1.accent { color: var(--hl); }
.lead { color: var(--muted); text-align: center; font-size: 1rem; line-height: 1.55; }
.lead b { color: var(--text); font-weight: 600; }

/* ---------- campos ---------- */
.field { display: grid; gap: 10px; }
.field label { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--title); }
.field input {
  font: inherit; font-size: 1.05rem; color: var(--text); width: 100%;
  background: var(--card); border: 1.5px solid var(--line-strong); border-radius: 16px;
  padding: 15px 18px; outline: none; box-shadow: var(--shadow);
}
.field input::placeholder { color: var(--muted); opacity: 0.7; }
.field input:focus { border-color: var(--sel); }
.field .hint { color: var(--red); font-size: 0.85rem; min-height: 1em; }

/* ---------- botões (pílula ciano; compra em vermelho) ---------- */
.btn {
  font: inherit; font-weight: 600; font-size: 1.02rem; width: 100%;
  padding: 16px 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--cyan); color: var(--ink);
  box-shadow: 0 10px 24px -12px rgba(30, 25, 19, 0.45);
  transition: background 0.2s, transform 0.15s var(--ease);
}
.btn:hover:not(:disabled) { background: var(--cyan-hover); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { background: var(--track); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.btn:focus-visible, .opt:has(input:focus-visible), .ruler-track:focus-visible { outline: 3px solid var(--sel); outline-offset: 3px; }
.btn-cta { display: block; text-align: center; text-decoration: none; background: var(--red); color: #fff; margin-top: 18px; }
.btn-cta:hover:not(:disabled) { background: var(--red-hover); }

/* ---------- capa ---------- */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1;
  background: #0b1030; box-shadow: var(--shadow);
}
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.selo {
  position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border-radius: 13px; background: var(--red); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.selo img { width: 20px; height: auto; }
.band { height: 44px; background: var(--band) repeat-x center / auto 100%; border-radius: 10px; }

/* ---------- opções ---------- */
.opts { display: grid; gap: 12px; }
.opts.grid { grid-template-columns: 1fr 1fr; }
.opt {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; box-shadow: var(--shadow);
  transition: border-color 0.2s, background 0.2s, transform 0.15s var(--ease);
}
.opt:hover { border-color: var(--line-strong); }
.opt:active { transform: scale(0.985); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opts.grid .opt { flex-direction: column; text-align: center; padding: 22px 12px; gap: 10px; }
.opt .emoji { font-size: 2.2rem; line-height: 1; }
.opt .opt-img { flex: none; width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: var(--bg); }
.opts.radio .opt:has(.opt-img) { padding-block: 10px; }
.opt .txt { display: grid; gap: 4px; font-size: 1rem; }
.opt .txt b { font-weight: 600; }
.opt .txt span { color: var(--muted); font-size: 0.9rem; }
.opt .dot {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong);
  display: grid; place-items: center; transition: border-color 0.2s;
}
.opt .dot::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--sel); transform: scale(0); transition: transform 0.25s var(--ease); }
.opt:has(input:checked) { border-color: var(--sel); background: var(--card-sel); }
.opt:has(input:checked) .dot { border-color: var(--sel); }
.opt:has(input:checked) .dot::after { transform: scale(1); }
.opt:has(input:checked) .opt-img { outline: 2px solid var(--sel); outline-offset: 2px; }

/* ---------- régua ---------- */
.units { display: inline-flex; margin: 0 auto; padding: 4px; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.units button { font: inherit; font-weight: 600; border: 0; cursor: pointer; background: none; color: var(--muted); padding: 7px 22px; border-radius: 999px; }
.units button[aria-pressed="true"] { background: var(--cyan); color: var(--ink); }
.ruler-value { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 3.6rem; line-height: 1; color: var(--title); font-variant-numeric: tabular-nums; }
.ruler-value small { font-size: 1.3rem; margin-left: 4px; color: var(--muted); }
.ruler { position: relative; }
.ruler-track {
  display: flex; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory;
  padding: 0 calc(50% - var(--tick-w) / 2); cursor: grab; touch-action: pan-x;
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}
.ruler-track.dragging { scroll-snap-type: none; cursor: grabbing; }
.ruler-track::-webkit-scrollbar { display: none; }
.tick { flex: none; width: var(--tick-w); height: 104px; position: relative; scroll-snap-align: center; user-select: none; }
.tick::before { content: ''; position: absolute; left: 50%; top: 0; width: 2px; height: 26px; border-radius: 1px; background: var(--tick); }
.tick.mid::before { height: 40px; }
.tick.major::before { height: 70px; background: var(--muted); }
.tick b { position: absolute; left: 50%; top: 78px; transform: translateX(-50%); font-weight: 500; color: var(--muted); font-size: 0.95rem; }
.ruler-needle { position: absolute; left: 50%; top: 0; bottom: 18px; width: 4px; margin-left: -2px; background: var(--needle); border-radius: 2px; pointer-events: none; }
.ruler-needle::after { content: ''; position: absolute; bottom: -10px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--needle); }
.ruler-hint { text-align: center; color: var(--muted); font-size: 0.9rem; }

/* ---------- carregamento ---------- */
.loading-img { width: min(100%, 460px); margin: 0 auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.bar-meta { display: flex; justify-content: space-between; font-weight: 600; }
.bar { height: 12px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--bar); border-radius: inherit; }
.loading-text { color: var(--muted); text-align: center; line-height: 1.55; }

/* ---------- resultado ---------- */
.result { gap: 18px; }
.result h2 { font-family: var(--font-display); font-weight: 700; color: var(--title); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.6rem); text-align: center; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { border-radius: var(--radius); padding: 18px 12px; text-align: center; display: grid; gap: 8px; align-content: center; color: var(--ink); }
.stat .label { font-weight: 600; font-size: 0.85rem; line-height: 1.3; }
.stat .value { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .unit { font-size: 0.82rem; }
.stat.tmb { background: var(--cyan); }
.stat.get { background: var(--orange); }

.treino { width: min(100%, 470px); margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.treino img { display: block; width: 100%; height: auto; }
.treino.vertical { width: min(100%, 240px); }
.treino-card {
  position: relative; aspect-ratio: 470 / 280; display: grid; place-items: center; align-content: center; gap: 6px;
  background: var(--ink); color: #FFF8F0; padding-bottom: 36px; overflow: hidden;
}
.treino-card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: var(--band) repeat-x center / auto 100%; }
.treino-card .plano-titulo { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.treino-card .plano-kcal { font-family: var(--font-display); font-weight: 700; color: var(--cyan); font-size: clamp(2.8rem, 2rem + 4vw, 4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.treino-card img { width: 86px; }
.result-text { display: grid; gap: 10px; line-height: 1.55; color: var(--muted); text-align: center; }

@media (max-width: 480px) {
  .stat .value { font-size: 1.6rem; }
  .stat .label, .stat .unit { font-size: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
