/**
 * Rodapé editorial + FAB + scroll-top + mobile CTA
 */

/* —— Rodapé —— */
.layout-footer {
  margin-top: 0;
  background: oklch(0.98 0.006 250);
  border-top: none;
}

.layout-footer__cta {
  background: var(--primary, oklch(0.3 0.08 250));
  border-top: 3px solid var(--secondary, oklch(0.55 0.14 155));
}

.layout-footer__cta-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
}

@media (min-width: 768px) {
  .layout-footer__cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem;
  }
}

.layout-footer__cta-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: oklch(0.85 0.12 155);
}

.layout-footer__cta-title {
  margin: 0;
  max-width: 28rem;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #fff;
}

.layout-footer__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.9rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary, oklch(0.3 0.08 250));
  text-decoration: none;
  background: #fff;
  border: none;
  border-radius: 0.25rem;
  box-shadow: 0 8px 24px oklch(0.15 0.04 250 / 0.25);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.layout-footer__cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px oklch(0.15 0.04 250 / 0.32);
  color: var(--secondary, oklch(0.48 0.14 155));
}

.layout-footer__cta-btn:focus-visible {
  outline: 2px solid var(--secondary, oklch(0.55 0.14 155));
  outline-offset: 3px;
}

.layout-footer__body {
  border-bottom: 1px solid var(--border, oklch(0.92 0.01 250));
}

.layout-footer__grid {
  display: grid;
  gap: 2.5rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

@media (min-width: 768px) {
  .layout-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 2.5rem;
    padding: 3.5rem 2rem;
  }
}

@media (min-width: 1024px) {
  .layout-footer__grid {
    grid-template-columns: 1.4fr 0.78fr 1fr 0.82fr;
    gap: 2rem;
    align-items: start;
  }
}

.layout-footer__brand,
.layout-footer__col {
  align-self: start;
}

.layout-footer__col .layout-footer__heading {
  margin-top: 0;
}

.layout-footer__brand-panel {
  position: relative;
  min-height: 12.5rem;
  padding: 0;
  overflow: visible;
}

.layout-footer__brand-panel-link {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  border-radius: 0.25rem;
  text-decoration: none;
}

.layout-footer__brand-panel-link:focus-visible {
  outline: 2px solid var(--secondary, oklch(0.55 0.14 155));
  outline-offset: 3px;
}

.layout-footer__logo-watermark {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  min-height: 11rem;
  max-height: none;
  object-fit: contain;
  object-position: left center;
  opacity: 0.17;
  filter: saturate(0.88);
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}

@media (min-width: 768px) {
  .layout-footer__brand-panel {
    min-height: 14rem;
  }

  .layout-footer__logo-watermark {
    min-height: 13rem;
    width: 108%;
    opacity: 0.19;
  }
}

@media (min-width: 1024px) {
  .layout-footer__brand-panel {
    min-height: 15.5rem;
  }

  .layout-footer__logo-watermark {
    width: 112%;
    min-height: 14.5rem;
    opacity: 0.2;
  }
}

.layout-footer__brand-text {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 92%;
  max-width: 18.5rem;
  height: 62%;
  padding: 0;
  pointer-events: none;
}

.layout-footer__desc,
.layout-footer__badge {
  text-shadow:
    0 0 10px oklch(0.99 0.005 250 / 0.92),
    0 0 22px oklch(0.99 0.005 250 / 0.75);
}

.layout-footer__desc {
  margin: 0 0 0.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.48;
  color: var(--primary, oklch(0.28 0.08 250));
}

.layout-footer__badge {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--secondary, oklch(0.42 0.14 155));
}

@media (min-width: 768px) {
  .layout-footer__brand-text {
    max-width: 20rem;
    height: 58%;
  }

  .layout-footer__desc {
    font-size: 0.9375rem;
    line-height: 1.52;
    margin-bottom: 0.7rem;
  }

  .layout-footer__badge {
    font-size: 0.875rem;
  }
}

@media (min-width: 1024px) {
  .layout-footer__brand-text {
    max-width: 21rem;
  }
}

.layout-footer__heading {
  margin: 0 0 1.125rem;
  padding-bottom: 0.65rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary, oklch(0.3 0.08 250));
  border-bottom: 2px solid oklch(0.55 0.14 155 / 0.35);
}

.layout-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.layout-footer__links a {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground, oklch(0.45 0.02 250));
  text-decoration: none;
  transition: color 0.15s ease;
}

.layout-footer__links a:hover {
  color: var(--secondary, oklch(0.48 0.14 155));
}

.layout-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.layout-footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.layout-footer__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  margin-top: 0.05rem;
  background: #fff;
  border: 1px solid var(--border, oklch(0.92 0.01 250));
  border-radius: 0.25rem;
}

.layout-footer__icon svg,
.layout-footer__icon .lucide {
  width: 1rem;
  height: 1rem;
  color: var(--secondary, oklch(0.55 0.14 155));
}

.layout-footer__contact a {
  color: var(--muted-foreground, oklch(0.45 0.02 250));
  font-weight: 500;
  text-decoration: none;
  word-break: break-word;
}

.layout-footer__contact a:hover {
  color: var(--secondary, oklch(0.48 0.14 155));
}

.layout-footer__hours {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--muted-foreground, oklch(0.45 0.02 250));
}

.layout-footer__social-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.layout-footer__social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground, oklch(0.45 0.02 250));
  text-decoration: none;
  transition: color 0.15s ease;
}

.layout-footer__social-link:hover {
  color: var(--primary, oklch(0.3 0.08 250));
}

.layout-footer__social-icons {
  display: none;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.layout-footer__social-icon {
  display: inline-flex;
  border-radius: 0.25rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.layout-footer__social-icon:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.layout-footer__social-icon:focus-visible {
  outline: 2px solid var(--secondary, oklch(0.55 0.14 155));
  outline-offset: 2px;
}

.layout-footer__legal {
  background: var(--primary, oklch(0.3 0.08 250));
  color: oklch(1 0 0 / 0.88);
}

.layout-footer__legal-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2rem;
}

@media (min-width: 768px) {
  .layout-footer__legal-inner {
    padding: 2rem 2rem 2.25rem;
  }
}

.layout-footer__legal-brand {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.layout-footer__legal-brand strong {
  font-weight: 800;
  color: #fff;
}

.layout-footer__legal-sep {
  margin: 0 0.35rem;
  opacity: 0.45;
}

.layout-footer__legal-note {
  margin: 0 0 1.25rem;
  max-width: 52rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: oklch(1 0 0 / 0.65);
  opacity: 1;
}

.layout-footer__legal-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid oklch(1 0 0 / 0.14);
  font-size: 0.75rem;
  color: oklch(1 0 0 / 0.58);
}

@media (min-width: 640px) {
  .layout-footer__legal-bottom {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
  }
}

.layout-footer__legal-bottom a {
  font-weight: 700;
  color: oklch(0.88 0.12 155);
  text-decoration: none;
}

.layout-footer__legal-bottom a:hover {
  text-decoration: underline;
}

/* FAB WhatsApp */
.fab-whatsapp {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left, 0px));
  bottom: var(--fab-bottom, 1.25rem);
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.25rem;
  box-shadow: none;
  transition: transform 0.2s ease;
}

.fab-whatsapp:hover {
  transform: translateY(-3px);
}

.fab-whatsapp:focus-visible {
  outline: 2px solid #25d366;
  outline-offset: 3px;
}

@media (min-width: 1024px) {
  .fab-whatsapp {
    left: 1.5rem;
    bottom: 1.5rem;
  }
}

/* Voltar ao topo */
.scroll-top-btn {
  --scroll-ratio: 0;
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: var(--fab-bottom, 1.25rem);
  z-index: 45;
  display: grid;
  width: 3.875rem;
  height: 4rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition:
    opacity 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 1024px) {
  .scroll-top-btn {
    right: 1.5rem;
    bottom: 1.5rem;
  }
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn__progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 0.25rem 0 0 0.25rem;
  background: oklch(1 0 0 / 0.12);
  overflow: hidden;
  z-index: 0;
}

.scroll-top-btn__progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--secondary, oklch(0.55 0.14 155));
  transform: scaleY(var(--scroll-ratio, 0));
  transform-origin: bottom center;
  transition: transform 0.12s linear;
}

.scroll-top-btn__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  height: 100%;
  padding: 0.55rem 0.5rem 0.5rem;
  box-sizing: border-box;
  color: #fff;
  background: var(--primary, oklch(0.3 0.08 250));
  border: 1px solid oklch(1 0 0 / 0.14);
  border-radius: 0.25rem;
  box-shadow:
    0 10px 28px oklch(0.22 0.04 250 / 0.28),
    inset 0 3px 0 oklch(0.55 0.14 155 / 0.85);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease;
}

.scroll-top-btn__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--secondary, oklch(0.55 0.14 155));
  border-radius: 0.25rem 0.25rem 0 0;
}

.scroll-top-btn__icon {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform 0.22s ease;
}

.scroll-top-btn__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  opacity: 0.9;
}

.scroll-top-btn:hover .scroll-top-btn__panel,
.scroll-top-btn:focus-visible .scroll-top-btn__panel {
  transform: translateY(-3px);
}

.scroll-top-btn:hover .scroll-top-btn__icon,
.scroll-top-btn:focus-visible .scroll-top-btn__icon {
  transform: translateY(-2px);
}

.scroll-top-btn:focus-visible .scroll-top-btn__panel {
  outline: 2px solid var(--secondary, oklch(0.55 0.14 155));
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .layout-footer__cta-btn:hover,
  .fab-whatsapp:hover,
  .scroll-top-btn:hover .scroll-top-btn__panel {
    transform: none;
  }

  .scroll-top-btn,
  .scroll-top-btn__panel,
  .scroll-top-btn__icon,
  .scroll-top-btn__progress-fill {
    transition: none;
  }
}
