/* ===== HEADER ===== */
.logo-svg {
  display: inline-block;
  height: 28px;
  width: auto;
}

/* ===== APP HEADER (vinho com textura; presente em todas as etapas) ===== */
.app-header {
  position: relative;
  z-index: 95;
  color: #f6efe2;
  background-color: var(--wine);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 56px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 56px),
    linear-gradient(135deg, var(--wine-1) 0%, var(--wine-2) 55%, var(--wine-3) 100%);
}

/* Primeira tela (landing) mantém o logo dentro do hero, sem o header global */
body:has(#step1.active) .app-header {
  display: none;
}

.app-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 0;
}

.app-header__cell {
  display: flex;
  align-items: center;
  min-width: 0;
}

.app-header__cell--mid {
  display: none;
}

.app-header__logo {
  height: 25px;
  width: auto;
}

.app-header__badge {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(216, 179, 102, 0.5);
  background: rgba(216, 179, 102, 0.1);
  border-radius: 999px;
  padding: 8px 16px;
}

.app-header__badge-text {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  line-height: 1.2;
  white-space: nowrap;
}

.app-header__panini {
  height: 14px;
  width: auto;
}

/* Telas muito largas: logo e selo centrados nas laterais, como no redesign */
@media (min-width: 1500px) {
  .app-header__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 960px) minmax(0, 1fr);
    padding: 20px 0 0;
  }

  .app-header__cell {
    justify-content: center;
  }

  .app-header__cell--mid {
    display: block;
  }
}

/* ===== TRILHO DE PASSOS (4 marcadores; alimentado por updateProgress) ===== */
.step-rail {
  padding: 18px 24px 20px;
}

.step-rail__track {
  max-width: 912px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rail-line {
  flex: 1 1 auto;
  min-width: 14px;
  height: 1px;
  background: rgba(246, 239, 226, 0.25);
  transition: background 300ms;
}

.rail-line.completed {
  background: rgba(216, 179, 102, 0.7);
}

.rail-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: default;
}

.rail-step.clickable {
  cursor: pointer;
}

.rail-step:focus-visible {
  outline-color: var(--gold);
}

.rail-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  background: transparent;
  color: rgba(246, 239, 226, 0.55);
  border: 1px solid rgba(246, 239, 226, 0.35);
  transition: background 300ms, color 300ms, border-color 300ms;
}

.rail-step.done .rail-dot {
  background: var(--gold);
  color: var(--wine-1);
  border-color: var(--gold);
}

.rail-step.current .rail-dot {
  background: #f6efe2;
  color: #7c1019;
  border-color: #f6efe2;
}

.rail-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(246, 239, 226, 0.45);
  transition: color 300ms;
}

.rail-step.done .rail-label {
  color: rgba(246, 239, 226, 0.8);
}

.rail-step.current .rail-label {
  color: #fff;
}

.rail-step.clickable:hover .rail-dot {
  border-color: rgba(246, 239, 226, 0.75);
  color: rgba(246, 239, 226, 0.9);
}

.rail-step.done.clickable:hover .rail-dot {
  background: var(--gold-2);
  border-color: var(--gold-2);
}

/* Linha "PASSO X DE 4 — LABEL" (só mobile) */
.step-rail__info {
  display: none;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(246, 239, 226, 0.85);
}

@media (max-width: 767px) {
  .app-header__top {
    justify-content: center;
    padding-top: 16px;
  }

  .step-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
  }

  .step-rail__track {
    gap: 8px;
    /* WebKit (iOS) não conta o gap na largura intrínseca do flex container;
       centralizar via justify-content evita o shrink-to-fit bugado. */
    width: 100%;
    justify-content: center;
  }

  .rail-line {
    flex: 0 0 20px;
    min-width: 0;
  }

  .rail-label {
    display: none;
  }

  .step-rail__info {
    display: block;
  }
}

@media (max-width: 520px) {
  .app-header__logo {
    height: 18px;
  }

  .app-header__badge {
    gap: 7px;
    padding: 5px 12px;
  }

  .app-header__badge-text {
    font-size: 9px;
    letter-spacing: 1.4px;
  }

  .app-header__panini {
    height: 11px;
  }
}

/* ===== RODAPÉ (redesign: centrado, com ícones sociais) ===== */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--card-border-soft);
  padding: 24px 20px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.foot-org b {
  color: #5d5142;
  font-weight: 700;
}

.foot-line {
  margin-top: 4px;
}

.foot-social {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.foot-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1e8d8;
  color: #5d5142;
  transition: background 150ms, color 150ms;
}

.foot-social-link svg {
  display: block;
}

.foot-social-link:hover {
  background: #5d5142;
  color: #fffaef;
}

.foot-priv {
  margin-top: 14px;
}

.foot-priv a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.foot-priv a:hover {
  color: var(--cta);
}

@media (max-width: 520px) {
  .foot-sep {
    display: none;
  }

  .foot-part {
    display: block;
    margin-top: 7px;
  }

  .foot-part:first-child {
    margin-top: 0;
  }
}

