/* Moriah Movelaria — efeitos geométricos / linguagem de projeto */

:root {
  --plan-line: #94a8ba;
  --plan-line-soft: rgba(148, 168, 186, 0.35);
  --plan-grid: rgba(107, 131, 153, 0.08);
}

/* Fundo técnico em seções */
.plan-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--plan-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--plan-grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* Marquee de marcas */
@keyframes plan-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  animation: plan-marquee 28s linear infinite;
  width: max-content;
}

/* Links de navegação — traço de cota */
.plan-link {
  position: relative;
  padding-bottom: 6px;
}

.plan-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--plan-line);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.plan-link::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 7px;
  height: 7px;
  border-left: 1px solid var(--plan-line);
  border-bottom: 1px solid var(--plan-line);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.35s ease;
}

.plan-link:hover::after {
  width: 100%;
}

.plan-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* Badge / selo técnico */
.plan-badge {
  position: relative;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  border: 1px solid rgba(148, 168, 186, 0.35) !important;
  border-radius: 0 !important;
}

.plan-badge::before,
.plan-badge::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--plan-line-soft);
  pointer-events: none;
}

.plan-badge::before {
  top: 4px;
  left: 4px;
  border-right: 0;
  border-bottom: 0;
}

.plan-badge::after {
  right: 4px;
  bottom: 4px;
  border-left: 0;
  border-top: 0;
}

/* Botões — chanfro + varredura */
.plan-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.plan-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(184, 196, 206, 0.22) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  z-index: 0;
}

.plan-btn:hover::before {
  transform: translateX(120%);
}

.plan-btn > * {
  position: relative;
  z-index: 1;
}

.plan-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(15, 20, 25, 0.25);
}

.plan-btn-outline {
  border-color: rgba(148, 168, 186, 0.55) !important;
}

.plan-btn-outline:hover {
  border-color: #6b8399 !important;
}

/* Cards de portfólio — grid + moldura */
.plan-card {
  position: relative;
  isolation: isolate;
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.4s ease;
  background-image:
    linear-gradient(rgba(148, 168, 186, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 168, 186, 0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.plan-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 6;
  border: 1px solid transparent;
  transition: inset 0.45s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease;
  pointer-events: none;
  box-shadow:
    inset 14px 0 0 -13px transparent,
    inset -14px 0 0 -13px transparent,
    inset 0 14px 0 -13px transparent,
    inset 0 -14px 0 -13px transparent;
}

.plan-card:hover::before {
  opacity: 1;
}

.plan-card:hover::after {
  inset: 8px;
  border-color: rgba(148, 168, 186, 0.75);
  box-shadow:
    inset 18px 0 0 -17px var(--plan-line),
    inset -18px 0 0 -17px var(--plan-line),
    inset 0 18px 0 -17px var(--plan-line),
    inset 0 -18px 0 -17px var(--plan-line);
}

/* Crosshair central no hover */
.plan-card .plan-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  z-index: 8;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.plan-card .plan-crosshair::before,
.plan-card .plan-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(184, 196, 206, 0.85);
}

.plan-card .plan-crosshair::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  transform: translateY(-50%);
}

.plan-card .plan-crosshair::after {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  transform: translateX(-50%);
}

.plan-card:hover .plan-crosshair {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Cards de capacidade */
.plan-feature {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 1.75rem;
  border: 1px solid rgba(148, 168, 186, 0.12);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.35s ease, transform 0.35s ease, background-color 0.35s ease;
}

.plan-feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background: #6b8399;
  transition: top 0.35s ease, bottom 0.35s ease, box-shadow 0.35s ease;
}

.plan-feature::after {
  content: "";
  position: absolute;
  top: 0.85rem;
  left: 0.55rem;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--plan-line);
  border-left: 1px solid var(--plan-line);
  opacity: 0.5;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.plan-feature:hover {
  transform: translateY(-3px);
  border-color: rgba(148, 168, 186, 0.35);
  background: rgba(107, 131, 153, 0.06);
}

.plan-feature:hover::before {
  top: 0.6rem;
  bottom: 0.6rem;
  box-shadow: 0 0 12px rgba(107, 131, 153, 0.45);
}

.plan-feature:hover::after {
  transform: translate(-3px, -3px);
  opacity: 1;
}

/* Painel de estatística / formulário */
.plan-dimension,
.plan-panel {
  position: relative;
}

.plan-dimension::before,
.plan-panel::before,
.plan-panel::after,
.plan-dimension::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(148, 168, 186, 0.45);
  pointer-events: none;
  transition: all 0.4s ease;
}

.plan-dimension::before,
.plan-panel::before {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
}

.plan-dimension::after,
.plan-panel::after {
  right: 10px;
  bottom: 10px;
  border-left: 0;
  border-top: 0;
}

.plan-dimension:hover::before,
.plan-dimension:hover::after,
.plan-panel:hover::before,
.plan-panel:hover::after {
  width: 22px;
  height: 22px;
  border-color: var(--plan-line);
}

.plan-panel {
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.plan-panel:hover {
  border-color: rgba(148, 168, 186, 0.28) !important;
  box-shadow: inset 0 0 0 1px rgba(148, 168, 186, 0.08);
}

/* Depoimento */
.plan-quote {
  position: relative;
}

.plan-quote::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 120px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--plan-line-soft), transparent);
}

/* Imagens industriais */
.plan-media {
  position: relative;
}

.plan-media::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(148, 168, 186, 0);
  transition: inset 0.45s ease, border-color 0.35s ease;
  pointer-events: none;
  z-index: 15;
}

.group:hover .plan-media::after {
  inset: 6px;
  border-color: rgba(148, 168, 186, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .animate-marquee,
  .plan-btn,
  .plan-card,
  .plan-feature,
  .plan-link,
  .plan-panel,
  .plan-dimension {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Responsividade mobile ── */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: clip;
}

/* Header sólido — logo com fundo preto precisa de base opaca */
.site-header {
  background-color: #0f1419;
}

.site-logo img {
  display: block;
  height: 2.25rem;
  width: auto;
  max-height: 2.75rem;
}

@media (min-width: 768px) {
  .site-logo img {
    height: 2.75rem;
    max-height: 3rem;
  }
}

.mobile-nav-link {
  display: block;
  padding: 0.875rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #d1d5db;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.06);
}

.mobile-nav-link--cta {
  margin-top: 0.5rem;
  text-align: center;
  border: 1px solid #6b8399;
  color: #94a8ba;
}

.mobile-nav-link--cta:hover,
.mobile-nav-link--cta:focus-visible {
  background-color: #6b8399;
  color: #fff;
}

/* Hero: fundo preenche viewport, conteúdo pode crescer sem cortar */
#home .hero-bg {
  min-height: 100svh;
}

#home .hero-content {
  box-sizing: border-box;
}

.brands-strip {
  isolation: isolate;
}

/* Hero: scroll indicator só desktop */
@media (max-width: 767px) {
  .hero-scroll {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .hero-scroll {
    animation: hero-scroll-bounce 2s ease-in-out infinite;
  }
}

@keyframes hero-scroll-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* Cards portfólio: touch = texto sempre visível no mobile */
@media (max-width: 1023px) {
  .plan-card--mobile .plan-card-label,
  .plan-card--mobile .plan-card-desc {
    opacity: 1 !important;
  }
}

@media (min-width: 1024px) {
  .plan-card--mobile .plan-card-label {
    opacity: 0;
    transition: opacity 0.5s ease;
  }

  .plan-card--mobile .plan-card-desc {
    opacity: 0;
    transition: opacity 0.5s ease 0.1s;
  }

  .plan-card--mobile:hover .plan-card-label,
  .plan-card--mobile:hover .plan-card-desc {
    opacity: 1;
  }

  .plan-card--mobile:hover .absolute.inset-0.flex {
    transform: translateY(-0.5rem);
  }
}

/* Safe area iOS (barra do navegador) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .hero-content {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }

  #contato {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* Badge hero: evita overflow horizontal */
@media (max-width: 639px) {
  .plan-badge {
    max-width: calc(100vw - 2rem);
  }

  .plan-badge span {
    display: block;
    white-space: normal;
    line-height: 1.4;
  }
}

/* Marquee mais compacto no celular */
@media (max-width: 639px) {
  .animate-marquee {
    gap: 2rem !important;
    font-size: 1.125rem;
  }
}

/* Formulário: inputs maiores no touch */
@media (max-width: 767px) {
  .plan-panel input,
  .plan-panel textarea {
    font-size: 16px; /* evita zoom automático no iOS */
    min-height: 44px;
  }

  .plan-panel textarea {
    min-height: 88px;
  }
}

/* Depoimento: quebra de linha do cargo */
@media (max-width: 639px) {
  .plan-quote .text-left p:last-child {
    font-size: 0.65rem;
    line-height: 1.4;
  }
}
