/* Movimento e interação: efeitos limitados a superfícies e entradas curtas. */
.hero { isolation: isolate; }
body { position: relative; isolation: isolate; }
.site-background {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: .38;
  background: radial-gradient(ellipse at 85% 25%, #86ab4718, transparent 65%);
  mask-image: linear-gradient(110deg, #0005, #000 60%);
  -webkit-mask-image: linear-gradient(110deg, #0005, #000 60%);
}
.threads-canvas { display: block; width: 100%; height: 100%; }
.site-header { overflow-x: clip; overflow-y: visible; z-index: 30; }
.mobile-nav { max-height: calc(100vh - 77px); max-height: calc(100dvh - 77px); overflow-y: auto; overscroll-behavior: contain; }
.header-cta { position: relative; isolation: isolate; overflow: visible; }
.electric-border__canvas {
  position: absolute;
  top: -64px;
  left: -64px;
  z-index: 1;
  pointer-events: none;
  display: block;
  max-width: none;
}
.electric-border__canvas[hidden] { display: none; }
.motion-word { display: inline-block; color: inherit; }
/* Anula apenas a cor de destaque automática de spans nos títulos. */
.hero h1 .motion-word, h1 .motion-word, :is(h2,.mock-heading-h2) .motion-word { color: inherit; }
.desktop-nav { position: relative; isolation: isolate; }
.desktop-nav a { position: relative; z-index: 1; }
.nav-highlight {
  position: absolute;
  z-index: 0;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: 100px;
  transform: translateX(0) scaleX(0);
  transform-origin: left center;
  border: 1px solid #b4db4f24;
  border-radius: 7px;
  background: #c2ed4a0b;
  opacity: 0;
  pointer-events: none;
  transition: transform var(--bbb-duration-ui) var(--bbb-ease-out), opacity 150ms ease;
}
.desktop-nav[data-highlight="true"] .nav-highlight { opacity: 1; }

.plan-featured { isolation: isolate; }
.plan-featured::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: inherit;
  background: radial-gradient(230px circle at var(--spot-x, 50%) var(--spot-y, 40%), #d5ff4f14, transparent 72%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--bbb-duration-ui) ease;
}
.plan-featured:hover::after, .plan-featured:focus-within::after { opacity: 1; }
@media (min-width: 961px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .project-preview {
    transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transform-origin: center;
    transition: transform var(--bbb-duration-ui) var(--bbb-ease-out);
  }
  .project:hover .project-preview { will-change: transform; }
}
@media (max-width: 620px) {
  .site-background { opacity: .29; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-highlight, .button > span, .project-preview { transition: none; }
  .project-preview, .button > span { transform: none !important; }
  .site-background { opacity: .22; }
}
/* Espaço de leitura no fim da página, incluindo a área segura. */
.site-footer { padding-bottom: max(72px, calc(58px + env(safe-area-inset-bottom))); }

/* O botão mantém sempre a caixa clicável e o canvas elétrico no mesmo sítio.
   Só a superfície interior e o ícone respondem à pressão do rato. */
@media (min-width: 961px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .button { transform: none !important; position: relative; isolation: isolate; transition: background var(--bbb-duration-ui) ease, border-color var(--bbb-duration-ui) ease; }
  .button:not(.header-cta):not([type="submit"]):not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"])::before {
    content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit;
    background: currentColor; opacity: 0; pointer-events: none;
    transform: scale(1); transition: transform 100ms var(--bbb-ease-out), opacity 100ms ease;
  }
  .button:not(.header-cta):not([type="submit"]):not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"])[data-pointer-press]::before {
    transform: scale(.97); opacity: .12; transition-duration: var(--bbb-duration-press);
  }
  .button > span { transition: transform 100ms var(--bbb-ease-out); }
  .button:not([type="submit"]):not(:disabled):not([aria-disabled="true"])[data-pointer-press] > span {
    transform: scale(.97); transition-duration: var(--bbb-duration-press);
  }
  .hero-browser, .phone-mock, .preview-window, .barber-window, .clinic-window, .construction-window { transition: transform var(--bbb-duration-ui) var(--bbb-ease-out); }
}
@media (max-width: 960px), (pointer: coarse), (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button, .button:hover, .button:active, .button:focus-visible,
  .button > span, .project-preview, .project:hover .project-preview,
  .project:hover .project-window, .project-preview:hover .project-window,
  .project:hover .preview-window, .project:hover .barber-window,
  .project:hover .clinic-window, .project:hover .construction-window,
  .menu-toggle[aria-expanded="true"] span { transform: none !important; }
  .hero-browser, .hero-browser:hover { transform: rotate(-4deg) !important; }
  .phone-mock, .phone-mock:hover { transform: rotate(8deg) !important; }
  .nav-highlight, .plan-featured::after { opacity: 0 !important; }
}
