/* ==========================================================================
   PARTICIPE — a pergunta que se alarga e o formulário que nasce do botão
   ========================================================================== */

.join { padding: clamp(80px, 13vh, 170px) var(--margin) clamp(64px, 11vh, 140px); }

.join__title {
  --join-fs: clamp(60px, 11vw, 270px);
  max-width: var(--max);
  margin: 0 auto;
  font-size: var(--join-fs);
  font-weight: 880;
  line-height: .9;
  letter-spacing: -.012em;
  text-transform: uppercase;
}
.join__line {
  display: block;
  white-space: nowrap;
  font-variation-settings: "wdth" var(--jw, 92);
}
.join__line--2 { padding-left: clamp(0px, 9vw, 220px); }

.join__body {
  max-width: var(--max);
  margin: clamp(32px, 6vh, 80px) auto 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}
.join__copy {
  grid-column: 1 / span 4;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(18px, 1.2vw, 22px);
  line-height: 1.4;
}
.join__strong {
  margin-top: .7em;
  color: var(--ink);
  font-weight: 700;
  font-variation-settings: "wdth" 96;
}

.idea { grid-column: 6 / span 7; position: relative; }

/* O botão grande que vira formulário */
.idea__open {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: clamp(70px, 10svh, 104px);
  padding: 0 clamp(24px, 2.6vw, 40px);
  background: var(--ink);
  color: var(--paper);
  font-size: clamp(20px, 1.9vw, 34px);
  font-weight: 800;
  font-variation-settings: "wdth" 84;
  text-transform: uppercase;
  letter-spacing: .005em;
  text-align: left;
  transition: font-variation-settings .7s var(--ease-io), transform .4s var(--ease-out);
}
.idea__open:hover, .idea__open:focus-visible { font-variation-settings: "wdth" 104; }
.idea__open:active { transform: scale(.985); }
.idea__open-arrow { position: relative; width: 34px; height: 34px; overflow: hidden; flex: none; }
.idea__open-arrow svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transition: transform .6s var(--ease-io);
}
.idea__open-arrow svg:last-child { transform: translateX(-110%); }
.idea__open:hover .idea__open-arrow svg:first-child,
.idea__open:focus-visible .idea__open-arrow svg:first-child { transform: translateX(110%); }
.idea__open:hover .idea__open-arrow svg:last-child,
.idea__open:focus-visible .idea__open-arrow svg:last-child { transform: none; }

/* Formulário (tinta sobre papel, para dar foco) */
.idea__form {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(24px, 3vw, 48px);
  --line: rgba(245, 243, 237, .22);
}
.field { position: relative; }
.field label {
  display: block;
  font-size: var(--t-small);
  font-weight: 560;
  color: var(--muted-on-ink);
  margin-bottom: 8px;
  transition: color .3s;
}
.field .opt { font-weight: 400; }
.field:focus-within label { color: var(--paper); }
.field textarea,
.field input {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  padding: 8px 0 12px;
  color: var(--paper);
  font-size: clamp(18px, 1.3vw, 22px);
  line-height: 1.4;
  transition: border-color .3s;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 7.5em; font-size: clamp(20px, 1.6vw, 28px); line-height: 1.3; }
.field textarea::placeholder, .field input::placeholder { color: #85867F; }
.field textarea:focus, .field input:focus { outline: none; border-bottom-color: var(--blue-on-ink); }
.field textarea:focus-visible, .field input:focus-visible { outline: none; }
.field [aria-invalid="true"] { border-bottom-color: #F08A7E; }

.field__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted-on-ink);
  font-variant-numeric: tabular-nums;
}
.field__count.is-near { color: var(--paper); }
.field__error {
  min-height: 0;
  margin-top: 6px;
  font-size: 14px;
  color: #F5A99F;
}
.field__error:empty { display: none; }

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 180px);
  gap: clamp(16px, 2vw, 32px);
  margin-top: 26px;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.idea__privacy {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted-on-ink);
  max-width: 52ch;
}
.idea__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 26px;
}
.btn--send { background: var(--paper); color: var(--ink); }
.btn--send .btn__text { transition: transform .5s var(--ease-out); }
.btn--send::after {
  /* pá do catavento que “empurra” o texto ao passar o mouse */
  content: "";
  width: 10px; height: 10px;
  background: var(--blue);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  transition: transform .6s var(--ease-out);
}
.btn--send:hover::after, .btn--send:focus-visible::after { transform: translateX(4px) rotate(90deg); }
.btn--send[aria-busy="true"] { pointer-events: none; }
.btn--send[aria-busy="true"] .btn__text { opacity: .5; }
.btn__spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.btn--send[aria-busy="true"] .btn__spinner { display: block; }
.btn--send[aria-busy="true"]::after { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.idea__form .btn-text { color: var(--muted-on-ink); }
.idea__form .btn-text:hover { color: var(--paper); }

.idea__status:empty { display: none; }
.idea__status {
  margin-top: 24px;
  padding: 18px 20px;
  border-left: 3px solid var(--blue-on-ink);
  background: rgba(245, 243, 237, .06);
  font-size: 15px;
  line-height: 1.5;
}
.idea__status strong { display: block; font-weight: 700; margin-bottom: 4px; }
.idea__status[data-kind="ok"] { border-left-color: #9FD3A6; }
.idea__status[data-kind="error"] { border-left-color: #F5A99F; }
.idea__status .btn-text { color: var(--paper); margin-top: 8px; display: inline-block; }

/* ---------- Rodapé ---------- */
.foot { padding: clamp(64px, 10vh, 110px) var(--margin) 28px; }
.foot__top, .foot__bottom { max-width: var(--max); margin: 0 auto; }
.foot__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}
.foot__brand { font-size: clamp(56px, 8vw, 160px); color: var(--paper); display: block; }
.foot__links { display: flex; gap: 6px 28px; flex-wrap: wrap; }
.foot__links a {
  font-weight: 560;
  color: var(--muted-on-ink);
  padding: 8px 0;
  display: inline-block;
  transition: color .3s;
}
.foot__links a:hover { color: var(--paper); }
.foot__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: clamp(40px, 7vh, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--muted-on-ink);
}
.foot__top-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; color: var(--paper); font-weight: 560; }
.foot__top-link svg { width: 18px; height: 18px; transform: rotate(180deg); transition: transform .5s var(--ease-out); }
.foot__top-link:hover svg { transform: rotate(180deg) translateY(4px); }

/* ---------- Responsivo ---------- */
@media (max-width: 1023px) {
  .join__copy { grid-column: 1 / -1; }
  .idea { grid-column: 1 / -1; margin-top: 36px; }
}
@media (max-width: 699px) {
  .join__line--2 { padding-left: 0; }
  .field-row { grid-template-columns: 1fr; gap: 22px; }
  .idea__actions { flex-wrap: wrap; }
  .idea__open { min-height: 76px; }
}
