/*
 * /comofunciona — o passo a passo do pedido com as telas reais do app.
 *
 * Herda de styles.css tokens, botões, cabeçalho, rodapé, o celular (.device) e o
 * prato girando (.spin). Tudo o que mexe na página é CSS, porque a política do
 * site proíbe JavaScript (public/_headers):
 *   - os passos são rádios escondidos (#s1…#s9) seguidos de <label>s;
 *   - as duas telas de um passo são outro par de rádios (.view-a / .view-b);
 *   - o prato em 3D é uma tira de 27 quadros: gira sozinho e, com o mouse em
 *     cima, cada uma das 27 faixas mostra um ângulo.
 * Os marcadores numerados ficam aqui (estilo inline também é proibido): a
 * posição é em % da captura de 1080x2340, medida no próprio print.
 */

/* ─── Abertura ───────────────────────────────────────────────────────── */

.cf-hero {
  overflow: clip;
}
.cf-hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 56px;
  padding-top: 64px;
  padding-bottom: 72px;
}
.cf-hero h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 800;
  max-width: 13ch;
}
.cf-lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 40ch;
  margin: 20px 0 32px;
}
.cf-hero-note {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--secondary);
}
.cf-hero-figure {
  margin: 0;
  justify-self: center;
  width: 310px;
  max-width: 100%;
  position: relative;
}
/* O balcão laranja atrás do celular. */
.cf-hero-figure::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 46%;
  width: 150%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange-soft);
  transform: translate(-50%, -50%);
  z-index: -1;
}
.cf-hero-figure figcaption {
  margin-top: 18px;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 900px) {
  .cf-hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 44px;
    padding-bottom: 56px;
  }
  .cf-hero-figure {
    width: min(290px, 78vw);
  }
}

/* ─── Passo a passo ──────────────────────────────────────────────────── */

/* O cabeçalho fixo tem 68 px: sem folga, o link #passo-a-passo esconde o título. */
#passo-a-passo,
#duvidas {
  scroll-margin-top: 68px;
}

.cf-tour-section {
  background: var(--page);
  padding: 80px 0 88px;
  overflow: clip;
}
.cf-tour-head {
  max-width: 620px;
  margin-bottom: 40px;
}
.cf-tour-head h2 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
}
.cf-tour-head p {
  color: var(--muted);
  font-size: 18px;
  margin: 12px 0 0;
}

.tour {
  position: relative;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}
/* Os rádios ficam focáveis (teclado: setas trocam de passo), só invisíveis. */
.tour-radio,
.view-radio {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

/* Lista de passos */
.tour-nav {
  position: sticky;
  top: 96px;
}
.tour-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.tour-nav label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tour-nav label:hover {
  background: rgb(255 255 255 / 0.7);
  color: var(--text);
}
.tour-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--border);
  color: var(--secondary);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Passo atual */
#s1:checked ~ .tour-nav label[for='s1'],
#s2:checked ~ .tour-nav label[for='s2'],
#s3:checked ~ .tour-nav label[for='s3'],
#s4:checked ~ .tour-nav label[for='s4'],
#s5:checked ~ .tour-nav label[for='s5'],
#s6:checked ~ .tour-nav label[for='s6'],
#s7:checked ~ .tour-nav label[for='s7'],
#s8:checked ~ .tour-nav label[for='s8'],
#s9:checked ~ .tour-nav label[for='s9'] {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}
#s1:checked ~ .tour-nav label[for='s1'] .tour-num,
#s2:checked ~ .tour-nav label[for='s2'] .tour-num,
#s3:checked ~ .tour-nav label[for='s3'] .tour-num,
#s4:checked ~ .tour-nav label[for='s4'] .tour-num,
#s5:checked ~ .tour-nav label[for='s5'] .tour-num,
#s6:checked ~ .tour-nav label[for='s6'] .tour-num,
#s7:checked ~ .tour-nav label[for='s7'] .tour-num,
#s8:checked ~ .tour-nav label[for='s8'] .tour-num,
#s9:checked ~ .tour-nav label[for='s9'] .tour-num {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
/* Passos já vistos (os anteriores ao atual) */
#s2:checked ~ .tour-nav li:nth-child(-n + 1) .tour-num,
#s3:checked ~ .tour-nav li:nth-child(-n + 2) .tour-num,
#s4:checked ~ .tour-nav li:nth-child(-n + 3) .tour-num,
#s5:checked ~ .tour-nav li:nth-child(-n + 4) .tour-num,
#s6:checked ~ .tour-nav li:nth-child(-n + 5) .tour-num,
#s7:checked ~ .tour-nav li:nth-child(-n + 6) .tour-num,
#s8:checked ~ .tour-nav li:nth-child(-n + 7) .tour-num,
#s9:checked ~ .tour-nav li:nth-child(-n + 8) .tour-num {
  background: var(--orange-soft);
  border-color: var(--orange-soft);
  color: var(--orange-deep);
}
/* Foco de teclado no rádio aparece no rótulo dele */
#s1:focus-visible ~ .tour-nav label[for='s1'],
#s2:focus-visible ~ .tour-nav label[for='s2'],
#s3:focus-visible ~ .tour-nav label[for='s3'],
#s4:focus-visible ~ .tour-nav label[for='s4'],
#s5:focus-visible ~ .tour-nav label[for='s5'],
#s6:focus-visible ~ .tour-nav label[for='s6'],
#s7:focus-visible ~ .tour-nav label[for='s7'],
#s8:focus-visible ~ .tour-nav label[for='s8'],
#s9:focus-visible ~ .tour-nav label[for='s9'] {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* Painéis: só o do passo marcado aparece */
.panel {
  position: relative;
  display: none;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  animation: cf-panel-in 0.35s ease backwards;
}
#s1:checked ~ .tour-panels .panel-1,
#s2:checked ~ .tour-panels .panel-2,
#s3:checked ~ .tour-panels .panel-3,
#s4:checked ~ .tour-panels .panel-4,
#s5:checked ~ .tour-panels .panel-5,
#s6:checked ~ .tour-panels .panel-6,
#s7:checked ~ .tour-panels .panel-7,
#s8:checked ~ .tour-panels .panel-8,
#s9:checked ~ .tour-panels .panel-9 {
  display: grid;
}
@keyframes cf-panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* As duas telas de um passo */
.shot {
  position: absolute;
  inset: 0;
  display: none;
}
.shot-a,
.view-b:checked ~ .tour-phone .shot-b {
  display: block;
}
.view-b:checked ~ .tour-phone .shot-a {
  display: none;
}
/* `.tour-text` na frente: `.tips` (mais abaixo) também define `display`. */
.tour-text .tips-b,
.view-b:checked ~ .tour-text .tips-a {
  display: none;
}
.view-b:checked ~ .tour-text .tips-b {
  display: grid;
}

/* Texto do passo */
.tour-text {
  padding-top: 8px;
  max-width: 520px;
}
.tour-count {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--orange-text);
}
.tour-text h3 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
}
.tour-text > p:not(.tour-count) {
  color: var(--muted);
  margin: 12px 0 0;
}

/* Seletor das duas telas */
.views {
  display: inline-flex;
  gap: 4px;
  margin-top: 22px;
  padding: 4px;
  border-radius: 999px;
  background: #e4e4e4;
}
.views label {
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.views label:hover {
  color: var(--text);
}
.view-a:checked ~ .tour-text .views label:first-child,
.view-b:checked ~ .tour-text .views label:last-child {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}
.view-a:focus-visible ~ .tour-text .views label:first-child,
.view-b:focus-visible ~ .tour-text .views label:last-child {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* Lista numerada: o número é o mesmo do marcador em cima do celular */
.tips {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  counter-reset: tip;
}
.tips li {
  position: relative;
  padding: 10px 12px 10px 50px;
  border-radius: 12px;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
  transition: background 0.15s ease;
}
.tips li::before {
  counter-increment: tip;
  content: counter(tip);
  position: absolute;
  left: 12px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
}

.tour-steps-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* ─── Marcadores ─────────────────────────────────────────────────────── */

.pin {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid #fff;
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: cf-pin-in 0.4s cubic-bezier(0.3, 1.5, 0.5, 1) backwards;
  animation-delay: 0.25s;
}
.pin:nth-of-type(2) { animation-delay: 0.33s; }
.pin:nth-of-type(3) { animation-delay: 0.41s; }
.pin:nth-of-type(4) { animation-delay: 0.49s; }
@keyframes cf-pin-in {
  from { transform: translate(-50%, -50%) scale(0); }
  to { transform: translate(-50%, -50%) scale(1); }
}

/* Passar o mouse num item da lista acende o marcador dele, e vice-versa. */
.panel:has(.tips-a > li:nth-child(1):hover) .shot-a > .pin:nth-of-type(1),
.panel:has(.tips-a > li:nth-child(2):hover) .shot-a > .pin:nth-of-type(2),
.panel:has(.tips-a > li:nth-child(3):hover) .shot-a > .pin:nth-of-type(3),
.panel:has(.tips-a > li:nth-child(4):hover) .shot-a > .pin:nth-of-type(4),
.panel:has(.tips-b > li:nth-child(1):hover) .shot-b > .pin:nth-of-type(1),
.panel:has(.tips-b > li:nth-child(2):hover) .shot-b > .pin:nth-of-type(2),
.panel:has(.tips-b > li:nth-child(3):hover) .shot-b > .pin:nth-of-type(3),
.panel:has(.tips-b > li:nth-child(4):hover) .shot-b > .pin:nth-of-type(4),
.pin:hover {
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 0 0 6px rgb(255 102 0 / 0.35), 0 2px 8px rgb(0 0 0 / 0.35);
}
.tips li:hover,
.panel:has(.shot-a > .pin:nth-of-type(1):hover) .tips-a > li:nth-child(1),
.panel:has(.shot-a > .pin:nth-of-type(2):hover) .tips-a > li:nth-child(2),
.panel:has(.shot-a > .pin:nth-of-type(3):hover) .tips-a > li:nth-child(3),
.panel:has(.shot-a > .pin:nth-of-type(4):hover) .tips-a > li:nth-child(4),
.panel:has(.shot-b > .pin:nth-of-type(1):hover) .tips-b > li:nth-child(1),
.panel:has(.shot-b > .pin:nth-of-type(2):hover) .tips-b > li:nth-child(2),
.panel:has(.shot-b > .pin:nth-of-type(3):hover) .tips-b > li:nth-child(3),
.panel:has(.shot-b > .pin:nth-of-type(4):hover) .tips-b > li:nth-child(4) {
  background: var(--orange-soft);
}

/* Onde cada marcador cai, em % do print (x de 1080, y de 2340). */
.s-shopping .pin:nth-of-type(1) { left: 12.1%; top: 25.9%; }
.s-shopping .pin:nth-of-type(2) { left: 87.6%; top: 55%; }
.s-shopping .pin:nth-of-type(3) { left: 10.2%; top: 92.3%; }

.s-vitrine .pin:nth-of-type(1) { left: 37.9%; top: 8.4%; }
.s-vitrine .pin:nth-of-type(2) { left: 92%; top: 11.8%; }
.s-vitrine .pin:nth-of-type(3) { left: 70.4%; top: 36.3%; }
.s-vitrine .pin:nth-of-type(4) { left: 59.3%; top: 88%; }

.s-cardapio .pin:nth-of-type(1) { left: 6.1%; top: 12.8%; }
.s-cardapio .pin:nth-of-type(2) { left: 6.1%; top: 17.7%; }
.s-cardapio .pin:nth-of-type(3) { left: 50%; top: 27%; }
.s-cardapio .pin:nth-of-type(4) { left: 24.3%; top: 79%; }

.s-destaques .pin:nth-of-type(1) { left: 29.2%; top: 24%; }
.s-destaques .pin:nth-of-type(2) { left: 30.6%; top: 36.8%; }

.s-prato3d .pin:nth-of-type(1) { left: 8.3%; top: 14.1%; }
.s-prato3d .pin:nth-of-type(2) { left: 29.4%; top: 77.4%; }
.s-prato3d .pin:nth-of-type(3) { left: 31%; top: 85.1%; }

.s-ponto .pin:nth-of-type(1) { left: 57.4%; top: 52.8%; }
.s-ponto .pin:nth-of-type(2) { left: 11.9%; top: 67%; }
.s-ponto .pin:nth-of-type(3) { left: 17.5%; top: 83%; }

.s-adicionais .pin:nth-of-type(1) { left: 5.6%; top: 38%; }
.s-adicionais .pin:nth-of-type(2) { left: 5.6%; top: 62.8%; }
.s-adicionais .pin:nth-of-type(3) { left: 73.1%; top: 70.1%; }
.s-adicionais .pin:nth-of-type(4) { left: 14.8%; top: 82.9%; }

.s-carrinho .pin:nth-of-type(1) { left: 9.7%; top: 47.4%; }
.s-carrinho .pin:nth-of-type(2) { left: 79.7%; top: 49.9%; }
.s-carrinho .pin:nth-of-type(3) { left: 80.2%; top: 20.2%; }
.s-carrinho .pin:nth-of-type(4) { left: 28.3%; top: 87.3%; }

.s-pagamento .pin:nth-of-type(1) { left: 8.3%; top: 52.1%; }
.s-pagamento .pin:nth-of-type(2) { left: 14.8%; top: 63.3%; }
.s-pagamento .pin:nth-of-type(3) { left: 7%; top: 75.7%; }

.s-forma .pin:nth-of-type(1) { left: 13%; top: 50.3%; }
.s-forma .pin:nth-of-type(2) { left: 13%; top: 60%; }
.s-forma .pin:nth-of-type(3) { left: 24.4%; top: 68.6%; }
.s-forma .pin:nth-of-type(4) { left: 32.2%; top: 87.2%; }

.s-acompanhar .pin:nth-of-type(1) { left: 14.4%; top: 36.8%; }
.s-acompanhar .pin:nth-of-type(2) { left: 62%; top: 43.7%; }
.s-acompanhar .pin:nth-of-type(3) { left: 55.6%; top: 47.9%; }
.s-acompanhar .pin:nth-of-type(4) { left: 80.2%; top: 19.7%; }

.s-pronto .pin:nth-of-type(1) { left: 59.3%; top: 28.2%; }
.s-pronto .pin:nth-of-type(2) { left: 35.2%; top: 62.3%; }
.s-pronto .pin:nth-of-type(3) { left: 40.5%; top: 69.9%; }

.s-avisos .pin:nth-of-type(1) { left: 12.4%; top: 22.4%; }
.s-avisos .pin:nth-of-type(2) { left: 12.4%; top: 69.7%; }
.s-avisos .pin:nth-of-type(3) { left: 77.6%; top: 8.8%; }

/* ─── Passo a passo no tablet e no celular ───────────────────────────── */

@media (max-width: 1060px) {
  /* minmax(0,…): sem ele a fila de botões alarga a coluna até caber inteira. */
  .tour {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  /* A lista vira uma fila de botões que rola para o lado. */
  .tour-nav {
    position: static;
    margin: 0 calc(var(--gutter) * -1);
  }
  .tour-nav ol {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px var(--gutter) 10px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }
  .tour-nav li {
    flex: none;
    scroll-snap-align: start;
  }
  .tour-nav label {
    min-height: 44px;
    padding: 6px 14px 6px 6px;
    background: rgb(255 255 255 / 0.6);
    white-space: nowrap;
  }
  .tour-num {
    width: 30px;
    height: 30px;
  }
}
@media (max-width: 720px) {
  .cf-tour-section {
    padding: 56px 0 64px;
  }
  .panel {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .tour-phone {
    justify-self: center;
    width: min(290px, 80vw);
  }
  .tour-text {
    padding-top: 0;
  }
}

/* ─── Dúvidas ────────────────────────────────────────────────────────── */

.cf-faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: start;
}
.cf-faq-head h2 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
}
.cf-faq-head p {
  color: var(--muted);
  font-size: 18px;
  margin: 12px 0 0;
}
.faq {
  border-top: 1px solid var(--divider);
}
.faq details {
  border-bottom: 1px solid var(--divider);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    linear-gradient(var(--orange-deep), var(--orange-deep)) center / 12px 2px no-repeat,
    linear-gradient(var(--orange-deep), var(--orange-deep)) center / 2px 12px no-repeat,
    var(--orange-soft);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq summary:hover {
  color: var(--orange-text);
}
.faq summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 6px;
}
.faq details p {
  margin: 0 0 20px;
  max-width: 60ch;
  color: #333;
}
@media (max-width: 860px) {
  .cf-faq-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ─── Fecho ──────────────────────────────────────────────────────────── */

.cf-end {
  background: var(--graphite);
  color: #fff;
  padding: 72px 0;
}
.cf-end h2 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
}
.cf-end p {
  color: #cfcfcf;
  font-size: 18px;
  max-width: 52ch;
  margin: 12px 0 0;
}
.cf-end .partner-cta {
  margin-top: 32px;
}

/* ─── Menos movimento ────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .panel,
  .pin { animation: none; }
  .faq summary::after { transition: none; }
}
