/* ALUZ · Connect page · Demanda Própria Odontologia
   Uma tela por vez, coluna central, barra de progresso (padrão do benchmark),
   com a identidade da ALUZ: papel claro, tinta azul-marinho, acento cobalto único. */

@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-normal-400-800.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --navy: #fffcfa;
  --night: #26301f;
  --cobalt: #4a6340;
  --cobalt-hover: #3c5234;
  --cobalt-tint: #ebefe5;
  --cyan: #a65437;
  --paper: #faf5f1;
  --white: #fffcfa;
  --ink: #26301f;
  --ink-soft: #4a5244;
  --ink-faint: #5a6150;
  --line: rgba(38, 48, 31, 0.12);
  --field-border: #8a907f;
  --error: #b42318;
  --wa: #128c4a;
  --wa-hover: #0e753d;

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --r-ctl: 12px;
  --r-panel: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --col: 600px;
  --gutter: 16px;
  --bar-h: 55px; /* barra + progresso */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cobalt); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
h1:focus, h2:focus, h1:focus-visible, h2:focus-visible { outline: none; }

/* ---------- Barra superior + progresso ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--navy);
  color: #eef4fb;
}
.bar__inner {
  position: relative;
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 14px var(--gutter);
  height: calc(var(--bar-h) - 3px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bar__logo { width: 104px; height: auto; }
.bar__back {
  position: absolute;
  left: calc(var(--gutter) - 10px);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: #c3d0e1;
}
.bar__back svg { width: 22px; height: 22px; fill: currentColor; }
.bar__back:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.bar__back:focus-visible { outline-color: var(--cyan); }
.bar__count {
  position: absolute;
  right: var(--gutter);
  font: 600 13px/1 var(--font-body);
  color: #a4b5ca;
  font-variant-numeric: tabular-nums;
}
.progress { height: 3px; background: rgba(164, 181, 202, 0.22); }
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cyan);
  transition: width 0.5s var(--ease);
}

/* ---------- Palco e telas ---------- */
.stage {
  flex: 1;
  width: 100%;
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 28px var(--gutter) 48px;
  display: flex;
  flex-direction: column;
}
.stage > [data-flow] { display: contents; }
.screen { width: 100%; margin: 0; }
@media (min-width: 720px) and (min-height: 640px) { .screen { margin: auto 0; } }
.screen.is-active { animation: enter 0.42s var(--ease) both; }
.screen.is-active.is-back { animation-name: enter-back; }
.screen.is-leaving { animation: leave 0.16s ease-in both; }
.screen.is-leaving.is-back { animation-name: leave-back; }
@keyframes enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@keyframes leave { to { opacity: 0; transform: translateY(-12px); } }
@keyframes leave-back { to { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) {
  .screen.is-active, .screen.is-leaving { animation: none; }
  .progress span { transition: none; }
}

/* ---------- Tipografia ---------- */
.eyebrow {
  margin: 0 0 12px;
  font: 700 12.5px/1.2 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
}
h1, h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(27px, 6.6vw, 36px); line-height: 1.13; }
h2 { font-size: clamp(23px, 5.2vw, 31px); line-height: 1.18; }
.lead { margin: 14px 0 0; font-size: 17.5px; color: var(--ink-soft); text-wrap: pretty; }
.help { margin: 10px 0 0; font-size: 15.5px; color: var(--ink-faint); text-wrap: pretty; }
.micro { margin: 12px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-faint); text-align: center; }
.micro a { color: inherit; }
.note { margin: 22px 0 0; font-size: 15px; color: var(--ink-faint); }

/* ---------- Boas-vindas ----------
   Mesmo esqueleto da tela inicial do Chronosdock: coluna da altura do celular,
   conteúdo centralizado no meio e o botão preso ao pé da tela. Texto leve, sem caixas. */
body[data-screen="welcome"] .stage { padding-top: 0; padding-bottom: 0; }
.screen--welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--bar-h));
}
.welcome__body { margin: auto 0; padding: 20px 0 4px; }
.screen--welcome h1 { font-size: clamp(24px, 6.5vw, 34px); line-height: 1.15; }
.welcome__lead { margin: 12px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.ticks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.ticks li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
}
.ticks svg { width: 18px; height: 18px; margin-top: 2px; fill: var(--cobalt); }
.fit { margin: 14px 0 0; font-size: 14px; line-height: 1.45; font-style: italic; color: var(--ink-faint); }
.cred { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.cred img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; flex: none; }
.cred p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ink-faint); }
.cred strong { color: var(--ink-soft); }
.welcome__foot { padding: 14px 0 max(14px, env(safe-area-inset-bottom)); }
.welcome__foot .micro { margin-top: 10px; }
@media (min-width: 720px) {
  .welcome__foot { padding-bottom: 32px; }
}

/* ---------- Botões ---------- */
.actions { margin-top: 24px; }
.actions--row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: var(--r-ctl);
  font: 650 16px/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, transform 0.18s var(--ease), box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 19px; height: 19px; fill: currentColor; flex: none; }
.btn:active:not(:disabled) { transform: scale(0.985); }
.btn--lg { min-height: 56px; padding: 15px 24px; font-size: 17px; }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--cobalt); color: #fff; box-shadow: 0 10px 24px -14px rgba(74, 99, 64, 0.9); }
.btn--primary:hover:not(:disabled) { background: var(--cobalt-hover); }
.btn--primary:disabled { background: #9db3cf; box-shadow: none; cursor: not-allowed; }
.btn--wa { background: var(--wa); color: #fff; box-shadow: 0 10px 24px -14px rgba(18, 140, 74, 0.9); }
.btn--wa:hover { background: var(--wa-hover); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--field-border); }
.enter-hint { font-size: 13px; color: var(--ink-faint); }
@media (pointer: coarse) { .enter-hint { display: none; } .actions--row .btn { width: 100%; } }

/* ---------- Escolhas ---------- */
.choices { display: grid; gap: 10px; margin-top: 24px; }
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.choice:hover { border-color: var(--cobalt); }
.choice:active { transform: scale(0.99); }
.choice__key {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font: 700 12.5px/1 var(--font-display);
  color: var(--ink-faint);
  transition: inherit;
}
.choice__label { font-size: 16.5px; font-weight: 600; line-height: 1.3; }
.choice[aria-checked="true"] { border-color: var(--cobalt); background: var(--cobalt-tint); }
.choice[aria-checked="true"] .choice__key { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }

/* ---------- Campos ---------- */
.form { margin-top: 24px; }
.form--contact { display: grid; gap: 16px; }
.form--contact .actions { margin-top: 6px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 14.5px; font-weight: 650; color: var(--ink); }
.field__input {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--r-ctl);
  background: var(--white);
  color: var(--ink);
  font: 500 17px/1.3 var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field__input::placeholder { color: #8796a9; }
.field__input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px rgba(74, 99, 64, 0.16); }
.field__input[aria-invalid="true"] { border-color: var(--error); }
.field__hint { margin: 0; font-size: 13.5px; color: var(--ink-faint); }
.field__error { margin: 0; font-size: 14px; font-weight: 600; color: var(--error); }
.field__error:empty { display: none; }
.screen--text .field__input { min-height: 60px; font-size: 19px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Agenda ---------- */
.agenda { margin-top: 22px; }
.agenda__loading { display: flex; align-items: center; gap: 12px; padding: 28px 0; color: var(--ink-faint); font-size: 15px; }
.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  border-top-color: var(--cobalt);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.agenda__label { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); }
.agenda__label + .slots, .days + .agenda__label { margin-top: 18px; }
.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 2px 2px 6px;
  margin: 0 -2px;
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 68px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--white);
  cursor: pointer;
}
.day__wd { font-size: 13px; font-weight: 600; color: var(--ink-faint); }
.day__dm { font: 650 16px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.day:hover { border-color: var(--cobalt); }
.day[aria-checked="true"] { border-color: var(--cobalt); background: var(--cobalt); color: #fff; }
.day[aria-checked="true"] .day__wd { color: rgba(255, 255, 255, 0.82); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot {
  min-height: 48px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--white);
  font: 650 16px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.slot:hover { border-color: var(--cobalt); }
.slot[aria-checked="true"] { border-color: var(--cobalt); background: var(--cobalt-tint); color: var(--cobalt); }
.agenda__status { margin: 14px 0 0; min-height: 1.4em; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.agenda__status:empty { min-height: 0; margin: 0; }
.agenda__skip { display: block; margin-top: 18px; text-align: center; font-size: 15px; font-weight: 600; }
.btn[aria-busy="true"] { opacity: 0.85; cursor: progress; }

/* ---------- Finais ---------- */
.screen--end { text-align: left; }
.end__mark {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--cobalt-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%230a5fd0' d='M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / 26px no-repeat;
}

/* ---------- Aviso de cookies ---------- */
.consent {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 10;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--navy);
  color: #dfe8f3;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: 0 16px 40px -18px rgba(7, 20, 38, 0.7);
}
.consent p { margin: 0; flex: 1; }
.consent a { color: var(--cyan); }
.consent__actions { display: flex; gap: 8px; flex: none; }
.consent .btn--ghost { color: #dfe8f3; border-color: rgba(164, 181, 202, 0.35); }

@media (max-width: 420px) {
  .consent { flex-direction: column; align-items: stretch; }
  .consent__actions .btn { flex: 1; }
}

@media (min-width: 720px) {
  :root { --gutter: 24px; --bar-h: 63px; }
  .stage { padding-top: 40px; padding-bottom: 64px; }
  .bar__logo { width: 124px; }
  .choices { gap: 12px; }
}

/* Celular estreito (360 px): botão em uma linha e título um pouco menor. */
@media (max-width: 380px) {
  .btn--lg { font-size: 16px; padding: 14px 16px; gap: 8px; }
  .screen--welcome h1 { font-size: 23px; }
}

/* Celular: opções um pouco mais baixas, para 6 opções caberem sem rolar. */
@media (max-width: 420px) {
  .choices { gap: 8px; margin-top: 20px; }
  .choice { min-height: 52px; padding: 10px 14px; }
}

/* Título com a cidade: invisível até a cidade chegar (connect.js põe .city-ready).
   Se o JS falhar, a animação mostra o título genérico depois de 1,8 s. */
.city-wait [data-city-tpl]{opacity:0;animation:city-show 0s 1.8s forwards}
.city-wait.city-ready [data-city-tpl]{opacity:1;animation:none;transition:opacity .2s ease}
@keyframes city-show{to{opacity:1}}

/* ---------- Grupo Aconchego: barra clara com a marca, títulos em Manrope 800 ---------- */
.bar { background: var(--white); color: var(--ink); border-bottom: 1px solid var(--line); }
.bar__back { color: var(--ink-soft); }
.bar__back:hover { background: rgba(38, 48, 31, 0.06); color: var(--ink); }
.bar__count { color: var(--ink-faint); }
.progress { background: rgba(38, 48, 31, 0.08); }
.bar__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.bar__brand img { width: 34px; height: 34px; }
.bar__brand span { display: grid; font: 800 14px/1.05 var(--font-body); letter-spacing: .04em; text-transform: uppercase; }
.bar__brand small { font: 700 10px/1.2 var(--font-body); letter-spacing: .16em; color: #a65437; }
h1, h2 { font-weight: 800; letter-spacing: -0.025em; }
.consent { background: var(--night); }
.consent a { color: #e3a07c; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0 4px; }
.thumbs figure { margin: 0; min-width: 0; }
.thumbs img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; }
.thumbs figcaption { font: 600 12.5px/1.25 var(--font-body); color: var(--ink-faint); margin-top: 6px; }
@media (max-height: 700px) { .thumbs img { aspect-ratio: 4 / 3; } .thumbs { margin-top: 12px; } }
