:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --border: #262626;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --accent: #a6c800;
  --accent-ink: #0a0a0a;
  --topbar-h: 38px;
  --header-h: 84px;
  --footer-h: 48px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: #0a0a0a !important;
  color-scheme: dark;
}

body.wpcrm-landing-page {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: #0a0a0a !important;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: calc(var(--topbar-h) + var(--header-h));
  padding-bottom: var(--footer-h);
  margin: 0;
  position: relative;
  min-height: 100vh;
}

/* Suporte quando barra de administração do WordPress estiver presente */
body.admin-bar.wpcrm-landing-page {
  padding-top: calc(32px + var(--topbar-h) + var(--header-h));
}

body.admin-bar .topbar {
  top: 32px;
}

body.admin-bar .header {
  top: calc(32px + var(--topbar-h));
}

@media screen and (max-width: 782px) {
  body.admin-bar.wpcrm-landing-page {
    padding-top: calc(46px + var(--topbar-h) + var(--header-h));
  }
  body.admin-bar .topbar {
    top: 46px;
  }
  body.admin-bar .header {
    top: calc(46px + var(--topbar-h));
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Fundo Animado (independente, z-index: 1, nunca ocultado pelo body)
   ========================================================================== */
.bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 20% 0%, #151a05 0%, var(--bg) 55%);
}

.bg > * {
  position: absolute;
  will-change: transform;
}

.bg-grid {
  inset: -240px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 80px 80px;
  transform: translate3d(0, calc(var(--scroll, 0) * -0.4px), 0);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.orb {
  border-radius: 50%;
  filter: blur(80px);
}

.orb-1 {
  width: 560px;
  height: 560px;
  background: rgba(166, 200, 0, .26);
  top: 5%;
  left: -160px;
  transform: translate3d(calc(var(--scroll, 0) * .25px), calc(var(--scroll, 0) * -.5px), 0);
}

.orb-2 {
  width: 460px;
  height: 460px;
  background: rgba(166, 200, 0, .18);
  top: 50%;
  right: -140px;
  transform: translate3d(calc(var(--scroll, 0) * -.3px), calc(var(--scroll, 0) * -.3px), 0) scale(calc(1 + var(--progress, 0) * .6));
}

.orb > i,
.ring > i,
.house > i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.orb > i {
  background: inherit;
  animation: drift 14s ease-in-out infinite alternate;
}

.orb-2 > i {
  animation-duration: 18s;
  animation-direction: alternate-reverse;
}

.ring {
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(calc(var(--scroll, 0) * .08deg)) scale(calc(1 + var(--progress, 0) * .5));
}

.ring > i {
  border: 1px dashed rgba(166, 200, 0, .22);
}

.ring-1 {
  width: 760px;
  height: 760px;
}

.ring-2 {
  width: 1100px;
  height: 1100px;
  transform: translate(-50%, -50%) rotate(calc(var(--scroll, 0) * -.05deg));
}

.ring-2 > i {
  border-style: solid;
  border-color: rgba(255, 255, 255, .05);
}

.house {
  width: 220px;
  height: 220px;
  color: rgba(166, 200, 0, .32);
}

.house svg {
  width: 100%;
  height: 100%;
  animation: float 9s ease-in-out infinite alternate;
}

.house-1 {
  top: 18%;
  left: 42%;
  transform: translate3d(0, calc(var(--scroll, 0) * -.7px), 0) rotate(calc(var(--progress, 0) * 25deg));
}

.house-2 {
  top: 70%;
  left: 8%;
  width: 140px;
  height: 140px;
  color: rgba(255, 255, 255, .12);
  transform: translate3d(calc(var(--scroll, 0) * .2px), calc(var(--scroll, 0) * -1.1px), 0) rotate(calc(var(--progress, 0) * -40deg));
}

.house-3 {
  top: 115%;
  right: 30%;
  width: 180px;
  height: 180px;
  transform: translate3d(0, calc(var(--scroll, 0) * -.9px), 0) rotate(calc(var(--progress, 0) * 30deg));
}

.house-3 svg {
  animation-delay: -4s;
}

.bg-line {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166, 200, 0, .6), transparent);
  transform: translate3d(calc(-60% + var(--progress, 0) * 120%), calc(var(--scroll, 0) * -.15px), 0);
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(80px, 60px) scale(1.15); }
}

@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-24px); }
}

/* ==========================================================================
   Topbar Fixa & Alternador de Idiomas
   ========================================================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: #000;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.topbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contacts {
  display: flex;
  gap: 20px;
  align-items: center;
}

.contacts a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}

.contacts a:hover {
  color: var(--accent);
}

.contacts svg {
  width: 14px;
  height: 14px;
  stroke: var(--accent);
}

.lang {
  display: flex;
  gap: 2px;
}

.lang button {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: color .2s, background .2s;
}

.lang button:hover {
  color: var(--text);
}

.lang button[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 600;
}

.lang button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================================================
   Header com Logo Fixo e Tagline
   ========================================================================== */
.header {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(10, 10, 10, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header img {
  height: 60px;
  width: auto;
  display: block;
}

.tagline {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

.tagline strong {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
}

.tagline span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ==========================================================================
   Conteúdo Principal & Statements
   ========================================================================== */
.layout {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-top: 48px;
  padding-bottom: 64px;
}

.statements {
  display: flex;
  flex-direction: column;
}

.statement {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
  opacity: .12;
  transform: translateY(40px);
  filter: blur(4px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1), filter .9s ease;
}

.statement.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

.statement .eyebrow {
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.statement .eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.statement h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  text-wrap: balance;
}

.statement h2 em {
  color: var(--accent);
  font-style: italic;
}

.statement p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 17px;
  max-width: 46ch;
}

/* ==========================================================================
   Formulário Card: Totalmente Estável Durante Scroll no Desktop
   (Sem parallax, sem translateY, sem transform vinculado a scroll)
   ========================================================================== */
.form-wrap {
  align-self: start;
  width: 100%;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

.card {
  background: rgba(20, 20, 20, .92);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  width: 100%;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

.card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
}

#lead-form h3 {
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
  width: 100%;
}

.error:empty {
  display: none;
}

.error {
  color: #ff6b6b;
  font-size: 12px;
  min-height: 0;
  line-height: 1.3;
  margin-top: 4px;
}

.req {
  color: var(--accent);
}

/* ==========================================================================
   Inputs com Float Label (Nome 100%, Email 100%, Telefone 100%)
   ========================================================================== */
.field--floating {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
  width: 100%;
}

.field--floating input[type="text"],
.field--floating input[type="email"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  height: 52px;
  padding: 20px 14px 6px 14px;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}

.field--floating input::placeholder {
  color: transparent;
}

.field--floating input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(166, 200, 0, .18);
}

.field--floating input[aria-invalid="true"] {
  border-color: #e5484d;
}

.field--floating > label {
  position: absolute;
  left: 14px;
  top: 16px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .2s ease, color .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

/* Float label ativado por foco, valor ou classe auxiliar */
.field--floating input:focus + label,
.field--floating input:not(:placeholder-shown) + label,
.field--floating.has-value > label {
  transform: translateY(-9px) scale(0.75);
  font-weight: 500;
  color: var(--accent);
}

.field--floating input:not(:focus):not(:placeholder-shown) + label,
.field--floating.has-value:not(:focus-within) > label {
  color: var(--muted);
}

.field--floating input[aria-invalid="true"] + label {
  color: #ff6b6b;
}

/* ==========================================================================
   Telefone 100% com DDI Select Integrado
   ========================================================================== */
.field--phone {
  margin-bottom: 14px;
  width: 100%;
}

.phone-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 52px;
  position: relative;
  border-radius: 8px;
  transition: box-shadow .2s;
}

.ddi-select-wrapper {
  position: relative;
  flex-shrink: 0;
  height: 52px;
}

.ddi-select-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  -webkit-appearance: none;
  appearance: none;
}

.ddi-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-right: 1px solid rgba(255, 255, 255, .08);
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  height: 100%;
  white-space: nowrap;
  pointer-events: none;
  transition: border-color .2s;
}

.ddi-trigger img {
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 1px rgba(255, 255, 255, .3);
}

.ddi-trigger svg {
  color: var(--muted);
}

.phone-input-wrapper {
  position: relative;
  flex: 1;
  height: 52px;
}

.phone-input-wrapper input[type="tel"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: none;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  height: 100%;
  padding: 20px 14px 6px 14px;
  width: 100%;
  transition: border-color .2s;
}

.phone-input-wrapper input::placeholder {
  color: transparent;
}

.phone-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent);
}

.phone-input-group:focus-within .ddi-trigger {
  border-color: var(--accent);
}

.phone-input-group:focus-within {
  box-shadow: 0 0 0 3px rgba(166, 200, 0, .18);
}

.phone-input-wrapper input[aria-invalid="true"] {
  border-color: #e5484d;
}

.phone-input-group:has(input[aria-invalid="true"]) .ddi-trigger {
  border-color: #e5484d;
}

.phone-input-wrapper > label {
  position: absolute;
  left: 14px;
  top: 16px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .2s ease, color .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.phone-input-wrapper input:focus + label,
.phone-input-wrapper input:not(:placeholder-shown) + label,
.phone-input-wrapper.has-value > label {
  transform: translateY(-9px) scale(0.75);
  font-weight: 500;
  color: var(--accent);
}

.phone-input-wrapper input:not(:focus):not(:placeholder-shown) + label,
.phone-input-wrapper.has-value:not(:focus-within) > label {
  color: var(--muted);
}

.phone-input-wrapper input[aria-invalid="true"] + label {
  color: #ff6b6b;
}

/* ==========================================================================
   Interesse & Consentimento
   ========================================================================== */
fieldset.field {
  border: 0;
  margin-top: 4px;
}

fieldset.field legend {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option span {
  display: block;
  text-align: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  background: var(--bg);
}

.option input:checked + span {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(166, 200, 0, .08);
}

.option input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(166, 200, 0, .25);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 16px;
  cursor: pointer;
  line-height: 1.45;
}

.check input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
}

/* Botão Enviar */
.btn {
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 13px;
  cursor: pointer;
  transition: filter .2s, transform .2s;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn:active {
  transform: scale(.99);
}

/* ==========================================================================
   Banners de Status, Erros e Sucesso
   ========================================================================== */
.form-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.form-banner--error {
  background: rgba(229, 72, 77, 0.15);
  border: 1px solid rgba(229, 72, 77, 0.4);
  color: #ff8b8e;
}

.form-banner--error svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke: #ff8b8e;
}

.success {
  display: none;
  text-align: center;
  padding: 24px 0;
}

.success.show {
  display: block;
}

.success svg {
  width: 48px;
  height: 48px;
  stroke: var(--accent);
  margin-bottom: 16px;
}

.success p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

/* Estado Indisponível */
.layout--unavailable {
  min-height: calc(100vh - var(--topbar-h) - var(--header-h) - var(--footer-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.card--unavailable {
  max-width: 560px;
  width: 100%;
  text-align: center;
  padding: 48px 32px;
}

.card--unavailable h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 16px;
}

.card--unavailable p {
  color: var(--muted);
  font-size: 16px;
}

/* ==========================================================================
   Footer Fixo com Link de Login Discreto (Ícone SVG)
   ========================================================================== */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--footer-h);
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.footer .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer a:hover {
  color: var(--accent);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Ícone discreto de login no rodapé com foco acessível */
.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #666;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  transition: color .2s, background-color .2s;
  line-height: 1;
}

.login-link svg {
  display: block;
}

.login-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

.login-link:focus-visible {
  color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: rgba(166, 200, 0, .08);
}

/* ==========================================================================
   Responsividade: Desktop Sticky Estável & Mobile Fluido
   ========================================================================== */
@media (min-width: 960px) {
  .layout {
    grid-template-columns: 1.15fr .85fr;
    gap: 80px;
    align-items: start;
    padding-top: 24px;
    padding-bottom: 64px;
  }

  .statement:first-child {
    min-height: calc(100vh - var(--topbar-h) - var(--header-h) - var(--footer-h) - 24px);
  }

  /* Form-wrap permanece estritamente fixo na viewport durante o scroll do conteúdo à esquerda */
  .form-wrap {
    position: sticky;
    top: calc(var(--topbar-h) + var(--header-h) + 24px);
    align-self: start;
    z-index: 20;
    width: 100%;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  body.admin-bar .form-wrap {
    top: calc(32px + var(--topbar-h) + var(--header-h) + 24px);
  }
}

@media (max-height: 700px) {
  :root {
    --header-h: 68px;
  }
  .header img {
    height: 48px;
  }
}

@media (max-width: 959px) {
  .layout {
    grid-template-columns: 1fr;
    padding-top: 20px;
    gap: 32px;
  }

  /* No mobile, fluxo natural antes dos statements sem travas */
  .form-wrap {
    position: static !important;
    order: -1;
    max-height: none;
    overflow: visible;
    width: 100%;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 72px;
  }
  .contacts .label-email {
    display: none;
  }
  .header img {
    height: 48px;
  }
  .tagline strong {
    font-size: 16px;
  }
  .tagline span {
    display: none;
  }
  .card {
    padding: 20px;
  }
  .footer .dev {
    display: none;
  }
}

@media (max-width: 480px) {
  .lang button {
    padding: 3px 5px;
    font-size: 11px;
  }
  .topbar .container {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .statement {
    transition: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
  .bg-grid,
  .orb,
  .bg-line,
  .house {
    transform: none !important;
  }
  .orb > i,
  .house svg {
    animation: none;
  }
}
