/* ==========================================================================
   PROJETO METAL E BRASA — COMPONENTES
   1. Botões (CTA padrão)
   2. Badges / pills / ponto pulsante
   3. Ícones em caixa e checks
   4. Marca (logo)
   5. Carrossel (scroll-snap)
   6. Lightbox
   7. Accordion (FAQ)
   8. CTA fixo no mobile
   ========================================================================== */

/* 1. Botões ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 16px 28px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--shadow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn .icon {
  font-size: 18px;
  stroke-width: 2.2;
  transition: transform var(--dur) var(--ease);
}
@media (hover: hover) {
  .btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -16px rgba(216, 117, 50, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
  .btn:hover .icon { transform: translateX(3px); }
}
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline-color: var(--text-light); outline-offset: 4px; }

.btn--lg {
  min-height: 62px;
  padding: 18px 34px;
  font-size: 17px;
}
.btn--block { width: 100%; }

@media (max-width: 419px) {
  .btn { padding-inline: 20px; letter-spacing: 0.02em; }
  .btn--lg { font-size: 16px; }
}

/* Link de texto com seta (navegação secundária, não é CTA) */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-light);
  text-decoration: none;
}
.text-link .icon { transition: transform var(--dur) var(--ease); stroke-width: 2.2; }
.text-link:hover .icon { transform: translateX(3px); }

/* 2. Badges ---------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-line);
  background: var(--accent-tint);
  color: var(--accent-light);
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pill .icon { font-size: 14px; }
@media (max-width: 419px) {
  .pill { padding: 7px 12px; font-size: 10.5px; letter-spacing: 0.08em; }
}
.pill__mark {
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: rotate(45deg);
}

.section--paper .pill,
.section--stone .pill {
  color: var(--accent-ink);
  background: rgba(216, 117, 50, 0.1);
  border-color: rgba(163, 80, 27, 0.3);
}

/* Ponto indicador com pulso (somente o ponto anima) */
.dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
}
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: dot-pulse 2s ease-out infinite;
}
@keyframes dot-pulse {
  0% { transform: scale(1); opacity: 0.75; }
  100% { transform: scale(3); opacity: 0; }
}

/* 3. Ícones em caixa e checks ---------------------------------------------- */
.icon-box {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(145deg, rgba(216, 117, 50, 0.16), rgba(216, 117, 50, 0.04));
  color: var(--accent-light);
  font-size: 22px;
}
.icon-box--sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 17px;
}

.check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent-light);
  font-size: 12px;
}
.check .icon { stroke-width: 3; }
.check--soft {
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
}

/* 4. Marca ----------------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  text-decoration: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line-dark-strong);
  background: linear-gradient(145deg, var(--graphite), var(--bg-secondary));
  color: var(--accent-light);
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.1;
}
.brand__name {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand__tag {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

/* 5. Carrossel ------------------------------------------------------------- */
.carousel { --item: 82%; --gap: 16px; position: relative; }

.carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--item);
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* espaço interno para a sombra dos cards não ser cortada */
  padding: 8px 6px 36px;
  margin: -8px -6px -36px;
  scroll-padding-inline: 6px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { min-width: 0; scroll-snap-align: start; }

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}
.carousel.is-static .carousel__controls { display: none; }

.carousel__dots { display: flex; flex-wrap: wrap; gap: 2px; }
.carousel__dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}
.carousel__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: currentColor;
  opacity: 0.25;
  transition: width var(--dur) var(--ease), opacity var(--dur) var(--ease), background-color var(--dur);
}
.carousel__dot[aria-current="true"]::before {
  width: 24px;
  opacity: 1;
  background: var(--accent);
}

.carousel__nav { display: flex; gap: 10px; }
.carousel__btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid currentColor;
  border-color: var(--line-light-strong);
  font-size: 20px;
  transition: background-color var(--dur), border-color var(--dur), color var(--dur), opacity var(--dur);
}
.carousel__btn .icon { stroke-width: 2; }
.carousel__btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.carousel__btn:disabled { opacity: 0.35; cursor: default; }
.section--dark .carousel__btn { border-color: var(--line-dark-strong); }

/* 6. Lightbox -------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 9, 10, 0.94);
  color: var(--text-light);
  overflow: hidden;
}
.lightbox:not([open]) { display: none; }
.lightbox[open] {
  display: grid;
  place-items: center;
  animation: lightbox-in 0.25s var(--ease);
}
.lightbox::backdrop { background: transparent; }

@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 72px 16px 56px;
}
@media (min-width: 768px) {
  .lightbox__stage { padding: 64px 96px 56px; }
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
}
.lightbox__img {
  width: auto;
  height: auto;
  max-width: min(1000px, 100%);
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  border-radius: 12px;
  object-fit: contain;
  box-shadow: var(--shadow-lg);
  background: var(--bg-secondary);
}
.lightbox__caption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.lightbox__btn {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line-dark-strong);
  background: rgba(24, 27, 30, 0.85);
  color: var(--text-light);
  font-size: 22px;
  transition: background-color var(--dur), border-color var(--dur);
}
.lightbox__btn:hover { background: var(--accent); border-color: var(--accent); }
.lightbox__btn .icon { stroke-width: 2; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev,
.lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
.lightbox__prev[hidden],
.lightbox__next[hidden] { display: none; }

@media (max-width: 767px) {
  .lightbox__prev,
  .lightbox__next { top: auto; bottom: 12px; transform: none; width: 44px; height: 44px; }
  .lightbox__prev { left: calc(50% - 52px); }
  .lightbox__next { right: calc(50% - 52px); }
}

/* 7. Accordion ------------------------------------------------------------- */
.accordion { border-top: 1px solid var(--line-dark-strong); }
.accordion__item { border-bottom: 1px solid var(--line-dark-strong); }

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 22px 0;
  font-family: var(--font-heading);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  color: var(--text-light);
  transition: color var(--dur);
}
.accordion__trigger:hover { color: var(--accent-light); }

.accordion__icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line-dark-strong);
  color: var(--text-light);
  transition: transform 0.35s var(--ease), background-color 0.35s, border-color 0.35s;
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.accordion__icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.accordion__item.is-open .accordion__icon {
  transform: rotate(45deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
}
.accordion__panel > div {
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 0.35s;
}
.accordion__item.is-open .accordion__panel { grid-template-rows: 1fr; }
.accordion__item.is-open .accordion__panel > div {
  visibility: visible;
  transition-delay: 0s;
}
.accordion__panel p {
  padding: 0 58px 24px 0;
  font-size: 15.5px;
  color: var(--text-muted);
}

/* Sem JavaScript: respostas visíveis */
.no-js .accordion__panel { grid-template-rows: 1fr; }
.no-js .accordion__panel > div { visibility: visible; }

/* 8. CTA fixo no mobile ---------------------------------------------------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(12, 14, 16, 0.94);
  border-top: 1px solid var(--line-dark-strong);
  box-shadow: 0 -16px 32px -16px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.sticky-cta.is-visible {
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}
.sticky-cta__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
  line-height: 1.2;
  color: var(--text-muted);
  white-space: nowrap;
}
.sticky-cta__info strong {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-light);
}
.sticky-cta .btn {
  flex: 1;
  min-height: 50px;
  padding: 12px 16px;
  font-size: 14px;
}

@media (min-width: 900px) {
  .sticky-cta { display: none; }
}
