/* ==========================================================================
   Contato — canais à esquerda, formulário à direita (desktop).
   Celular: tudo em coluna (introdução, canais, voltar, formulário).
   Fundo minimalista: preto com brilho dourado muito discreto.
   ========================================================================== */

.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(112px, 13vh, 140px) 0 clamp(64px, 8vh, 96px);
  background:
    radial-gradient(ellipse 60% 55% at 82% 38%, rgba(200, 148, 69, 0.07), transparent 70%),
    radial-gradient(ellipse 45% 50% at 6% 85%, rgba(200, 148, 69, 0.05), transparent 70%),
    var(--black);
  border-top: 1px solid rgba(200, 148, 69, 0.14);
  scroll-margin-top: 0;
}

/* Linhas douradas finas no canto, como na referência */
.contact::before,
.contact::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  pointer-events: none;
  border-top: 1px solid rgba(200, 148, 69, 0.28);
  transform-origin: right bottom;
}

.contact::before {
  width: min(420px, 34vw);
  transform: rotate(-52deg) translateX(12%);
}

.contact::after {
  width: min(300px, 24vw);
  right: min(70px, 5vw);
  opacity: 0.6;
  transform: rotate(-52deg) translateX(12%);
}

.contact__inner {
  width: min(1320px, 100% - 2 * var(--pad-x));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  column-gap: clamp(48px, 8vw, 140px);
  align-items: center;
}

/* ---------- Coluna esquerda ---------- */

.contact__info {
  min-width: 0;
}

.contact__eyebrow,
.contact-form__heading {
  display: flex;
  align-items: center;
  gap: 18px;
}

.contact__eyebrow i,
.contact-form__heading i {
  flex: 0 1 110px;
  height: 1px;
  background: linear-gradient(90deg, rgba(200, 148, 69, 0.7), transparent);
}

.contact__title {
  margin-top: 22px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 4.6vw, 4.4rem);
  line-height: 1.05;
  color: var(--white);
}

.contact__title em {
  font-style: italic;
  color: var(--gold-light);
}

.contact__intro {
  margin-top: 28px;
  max-width: 520px;
}

.contact__lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--white);
}

.contact__text {
  margin-top: 20px;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--gray);
}

/* Canais */
.contact__channels {
  display: grid;
  gap: 32px;
  margin-top: clamp(36px, 6vh, 56px);
}

.channel {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  column-gap: 30px;
  align-items: start;
}

.channel__icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(200, 148, 69, 0.75);
  border-radius: 50%;
  color: var(--gold-light);
  transition:
    background-color 0.6s var(--ease-out),
    border-color 0.6s var(--ease-out),
    box-shadow 0.6s var(--ease-out),
    transform 0.8s var(--ease-luxe);
}

.channel__icon svg {
  width: 28px;
  height: 28px;
}

.channel:hover .channel__icon {
  background: rgba(200, 148, 69, 0.08);
  border-color: var(--gold-lumi);
  box-shadow: 0 0 28px -8px rgba(200, 148, 69, 0.6);
  transform: translateY(-2px);
}

.channel__body {
  min-width: 0;
}

.channel__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--gold-light);
}

.channel__desc {
  margin-top: 6px;
  font-size: 0.84rem;
  color: var(--gray-soft);
}

.channel__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 40px;
  margin-top: 14px;
  padding: 0 20px;
  border: 1px solid rgba(200, 148, 69, 0.6);
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--white);
  transition:
    background-color 0.5s var(--ease-out),
    border-color 0.5s var(--ease-out),
    color 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}

.channel__pill svg {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--gold-light);
}

.channel__pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel__pill:hover,
.channel__pill:focus-visible {
  border-color: var(--gold-lumi);
  background: rgba(200, 148, 69, 0.1);
  color: var(--gold-lumi);
  box-shadow: 0 0 24px -10px rgba(200, 148, 69, 0.6);
}

/* Sem dado real configurado: aparência de campo, sem ação */
.channel__pill[aria-disabled="true"] {
  cursor: default;
}

.channel__pill[aria-disabled="true"]:hover {
  border-color: rgba(200, 148, 69, 0.6);
  background: transparent;
  color: var(--white);
  box-shadow: none;
}

/* Voltar ao início */
.contact__back {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  margin-top: clamp(36px, 6vh, 52px);
  padding: 0 28px;
  background: rgba(5, 5, 5, 0.6);
  border: 1px solid rgba(200, 148, 69, 0.7);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--white);
  transition:
    background-color 0.5s var(--ease-out),
    border-color 0.5s var(--ease-out),
    color 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out),
    transform 0.6s var(--ease-luxe),
    opacity 1s var(--ease-out);
}

.contact__back svg {
  width: 16px;
  height: 16px;
  color: var(--gold-light);
  transition: transform 0.6s var(--ease-luxe);
}

.contact__back:hover {
  border-color: var(--gold-lumi);
  background: rgba(200, 148, 69, 0.08);
  color: var(--gold-lumi);
  box-shadow: 0 14px 30px -18px rgba(200, 148, 69, 0.6);
}

.contact__back:hover svg {
  transform: translateX(-5px);
}

/* ---------- Coluna direita: formulário ---------- */

.contact__panel {
  min-width: 0;
  padding: clamp(28px, 3.4vw, 52px);
  background: linear-gradient(180deg, rgba(14, 14, 14, 0.92), rgba(7, 7, 7, 0.96));
  border: 1px solid rgba(200, 148, 69, 0.55);
  border-radius: 10px;
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.9);
}

.contact-form {
  display: grid;
  gap: 26px;
}

.contact-form__heading {
  margin-bottom: 2px;
}

.contact-form__heading i {
  flex: 1 1 auto;
}

.field {
  display: grid;
  gap: 10px;
}

.field__label {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--white);
}

.field__control {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  background: #101010;
  border: 1px solid rgba(168, 165, 160, 0.28);
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--white);
  outline: none;
  transition:
    border-color 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    background-color 0.4s var(--ease-out);
}

.field__control::placeholder {
  color: var(--gray);
  opacity: 1;
}

.field__control:hover {
  border-color: rgba(200, 148, 69, 0.5);
}

.field__control:focus {
  border-color: var(--gold-light);
  background: #121212;
  box-shadow: 0 0 0 3px rgba(200, 148, 69, 0.16), 0 0 26px -12px rgba(200, 148, 69, 0.7);
}

textarea.field__control {
  min-height: 132px;
  padding: 16px 20px;
  line-height: 1.6;
  resize: vertical;
}

/* Select personalizado */
.field__select {
  position: relative;
}

.field__select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 52px;
  cursor: pointer;
}

.field__select select:invalid {
  color: var(--gray);
}

.field__select option {
  background: #101010;
  color: var(--white);
}

.field__select svg {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 16px;
  height: 16px;
  color: var(--gray-soft);
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 0.4s var(--ease-out);
}

.field__select:focus-within svg {
  color: var(--gold-lumi);
}

/* Validação */
.field__error {
  min-height: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #e08a7a;
}

.field__error:empty {
  display: none;
}

.field.has-error .field__control {
  border-color: rgba(224, 138, 122, 0.8);
}

.field.has-error .field__control:focus {
  box-shadow: 0 0 0 3px rgba(224, 138, 122, 0.16);
}

.field.has-error .field__error {
  animation: fadeIn 0.4s var(--ease-out) both;
}

/* Botão enviar */
.contact-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  margin-top: 4px;
  background: linear-gradient(100deg, var(--gold-light) 0%, var(--gold) 100%);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--black);
  transition:
    transform 0.6s var(--ease-luxe),
    box-shadow 0.6s var(--ease-out),
    background 0.6s var(--ease-out),
    opacity 0.3s var(--ease-out);
}

.contact-form__submit svg {
  width: 18px;
  height: 18px;
  transition: transform 0.6s var(--ease-luxe);
}

.contact-form__submit:hover {
  background: linear-gradient(100deg, var(--gold-lumi) 0%, var(--gold-light) 100%);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -14px rgba(200, 148, 69, 0.6);
}

.contact-form__submit:hover svg {
  transform: translate(3px, -3px);
}

.contact-form__submit:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* Confirmação */
.contact-form__feedback {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: #07130c;
  border: 1px solid rgba(70, 140, 90, 0.45);
  border-radius: 8px;
  animation: contactFeedbackIn 0.7s var(--ease-luxe) both;
}

.contact-form__feedback[hidden] {
  display: none;
}

.contact-form__feedback-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(90, 170, 115, 0.65);
  border-radius: 50%;
  color: #6cc08a;
}

.contact-form__feedback-icon svg {
  width: 24px;
  height: 24px;
}

.contact-form__feedback-title {
  font-size: 1rem;
  font-weight: 400;
  color: var(--white);
}

.contact-form__feedback-text {
  margin-top: 4px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--gray-soft);
}

@keyframes contactFeedbackIn {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Tablet / notebook pequeno ---------- */

@media (max-width: 1099px) {
  .contact__inner {
    column-gap: 40px;
  }

  .channel {
    grid-template-columns: 58px minmax(0, 1fr);
    column-gap: 22px;
  }

  .channel__icon {
    width: 58px;
    height: 58px;
  }
}

/* ---------- Layout vertical: celulares e tablets em retrato ---------- */

@media (max-width: 767px), (max-width: 1023px) and (max-aspect-ratio: 1/1) {
  .contact {
    display: block;
    min-height: 0;
    padding: 104px 0 72px;
  }

  .contact::before,
  .contact::after {
    display: none;
  }

  .contact__inner {
    width: calc(100% - 2 * var(--gutter));
    max-width: 640px;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 44px;
  }

  .contact__title {
    font-size: clamp(2rem, 9.6vw, 3.4rem);
    white-space: nowrap;
  }

  .contact__lead {
    font-size: 1rem;
  }

  .contact__channels {
    gap: 26px;
  }

  .channel {
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 20px;
  }

  .channel__icon {
    width: 56px;
    height: 56px;
  }

  .channel__icon svg {
    width: 24px;
    height: 24px;
  }

  .channel__pill {
    min-height: 44px;
  }

  .contact__panel {
    padding: 28px 20px;
  }

  .contact-form {
    gap: 22px;
  }

  .field__control {
    min-height: 54px;
    font-size: 1rem; /* evita zoom automático no iPhone */
  }

  .contact-form__submit {
    min-height: 58px;
  }

  .contact-form__feedback {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 16px;
  }

  .contact-form__feedback-icon {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 374px) {
  .contact__back {
    padding: 0 20px;
    letter-spacing: 0.18em;
  }

  .contact-form__submit {
    letter-spacing: 0.18em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .channel:hover .channel__icon,
  .contact__back:hover,
  .contact-form__submit:hover {
    transform: none;
  }
}

/* ---------- Botão flutuante do WhatsApp ---------- */

.wa-float {
  position: fixed;
  right: max(22px, env(safe-area-inset-right, 0px));
  bottom: max(64px, calc(env(safe-area-inset-bottom, 0px) + 40px));
  z-index: 45;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition: transform 0.5s var(--ease-luxe), box-shadow 0.5s var(--ease-out), background-color 0.4s var(--ease-out), opacity 0.4s var(--ease-out), visibility 0s;
}

.wa-float svg {
  width: 34px;
  height: 34px;
}

.wa-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: waPulse 2.8s var(--ease-out) infinite;
  pointer-events: none;
}

.wa-float:hover {
  background: #2be370;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 16px 34px -10px rgba(37, 211, 102, 0.55);
}

.wa-float:focus-visible {
  outline-color: #fff;
}

/* some ao sair da tela inicial (a partir do Sobre) */
.wa-float.is-away {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
}

body.is-menu-open .wa-float,
body.is-area-open .wa-float {
  opacity: 0;
  visibility: hidden;
}

@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.6; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}

@media (max-width: 767px) {
  .wa-float {
    right: 16px;
    bottom: max(72px, calc(env(safe-area-inset-bottom, 0px) + 48px));
    width: 60px;
    height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float::after { animation: none; display: none; }
  .wa-float:hover { transform: none; }
}

/* ---------- Card "Entrar em contato" (WhatsApp) na tela inicial — computador ---------- */

.btn--whatsapp {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.5);
  color: var(--white);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.btn--whatsapp .btn__icon {
  display: inline-flex;
  color: #25d366;
}

.btn--whatsapp:hover,
.btn--whatsapp:focus-visible {
  background: rgba(37, 211, 102, 0.18);
  border-color: rgba(37, 211, 102, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(37, 211, 102, 0.6);
}

/* O botão fixo verde fica só no celular; no computador entra o card acima */
.wa-float {
  display: none;
}

@media (max-width: 767px), (max-width: 1023px) and (max-aspect-ratio: 1/1) {
  .wa-float {
    display: grid;
  }

  .btn--whatsapp {
    display: none;
  }
}
