/* ============================================================
   Componentes
   ============================================================ */

/* ---- Marca ---------------------------------------------- */
.brand {
  width: clamp(210px, 26vw, 330px);
  height: auto;
  color: var(--c-plum);
}

.brand--footer {
  width: clamp(150px, 18vw, 190px);
  color: color-mix(in srgb, var(--c-plum) 62%, transparent);
}

/* ---- Pill de data --------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2xs);
  padding: 0.5rem 1.125rem 0.5rem 0.875rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface-veil);
  backdrop-filter: blur(6px);
  font-size: var(--t-small);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.pill__sep {
  width: 1px;
  height: 0.9em;
  background: var(--line-strong);
}

.pill__icon {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--c-violet);
  flex: none;
}

/* ---- Botões --------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 4.125rem;
  padding: 0 2.25rem;
  border-radius: var(--r-pill);
  background: linear-gradient(140deg, #6f1a8e 0%, var(--action) 55%, #4a0f63 100%);
  color: var(--action-ink);
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--sh-action);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform var(--dur-fast) var(--ease-soft),
    box-shadow var(--dur-fast) var(--ease-soft),
    filter var(--dur-fast) var(--ease-soft);
}

/* Varredura de luz — o mesmo amanhecer do fundo, atravessando o botão */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(248, 234, 192, 0.32) 45%,
    rgba(244, 203, 225, 0.28) 55%,
    transparent 80%
  );
  transform: translateX(-110%);
  transition: transform 780ms var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-action-hover);
}

.btn:hover::after {
  transform: translateX(110%);
}

.btn:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.btn[disabled],
.btn[aria-busy="true"] {
  cursor: progress;
  filter: saturate(0.7) brightness(1.05);
}

.btn--block {
  width: 100%;
}

/* No celular a ação ocupa a largura toda: alvo de toque máximo,
   e nenhuma dúvida sobre onde tocar. */
@media (max-width: 47.99rem) {
  .btn {
    width: 100%;
    min-height: 4.375rem;
  }
}

/* Pulso contínuo: o botão respira até receber o clique. */
@keyframes btn-pulse {
  0%,
  100% {
    box-shadow: var(--sh-action), 0 0 0 0 rgba(138, 63, 160, 0.4);
  }
  55% {
    box-shadow: var(--sh-action-hover), 0 0 0 14px rgba(138, 63, 160, 0);
  }
}

.btn--pulse {
  animation: btn-pulse 2.6s var(--ease-soft) infinite;
}

.btn--pulse:hover,
.btn--pulse:focus-visible,
.btn--pulse[disabled] {
  animation-play-state: paused;
}

/* Sobre fundo escuro, a ação inverte: luz sobre a noite. */
.btn--light {
  background: linear-gradient(140deg, #fffaf0 0%, #fdeef6 55%, #f6dced 100%);
  color: var(--c-plum);
  box-shadow: 0 6px 22px rgba(20, 3, 30, 0.35);
}

.btn--light::after {
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(138, 63, 160, 0.16) 50%,
    transparent 80%
  );
}

.btn--light:hover {
  box-shadow: 0 12px 32px rgba(20, 3, 30, 0.42);
}

@keyframes btn-pulse-light {
  0%,
  100% {
    box-shadow: 0 6px 22px rgba(20, 3, 30, 0.35), 0 0 0 0 rgba(255, 255, 255, 0.45);
  }
  55% {
    box-shadow: 0 12px 32px rgba(20, 3, 30, 0.42), 0 0 0 14px rgba(255, 255, 255, 0);
  }
}

.btn--light.btn--pulse {
  animation-name: btn-pulse-light;
}

.btn__arrow {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  transition: transform var(--dur-fast) var(--ease-soft);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* ---- Formulário ----------------------------------------- */
/* Sem caixa: os campos flutuam sobre a arte, presos só pela sombra. */
.signup {
  width: 100%;
  max-width: 470px;
  margin-top: var(--sp-2xs);
}

.signup__form {
  display: grid;
  gap: 0.625rem;
}

.signup__submit {
  margin-top: 0.25rem;
}

.field {
  position: relative;
  display: block;
  min-width: 0;
}

.field__input {
  width: 100%;
  min-height: 3.375rem;
  padding: 0 1.5rem;
  border: 1.5px solid rgba(61, 11, 82, 0.14);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 1.0625rem;
  box-shadow: 0 1px 2px rgba(61, 11, 82, 0.04), 0 8px 20px rgba(61, 11, 82, 0.07);
  transition:
    border-color var(--dur-fast) var(--ease-soft),
    background-color var(--dur-fast) var(--ease-soft),
    box-shadow var(--dur-fast) var(--ease-soft);
}

.field__input::placeholder {
  /* legível de verdade: o texto do campo é instrução, não decoração */
  color: color-mix(in srgb, var(--c-plum) 62%, transparent);
  opacity: 1;
}

.field__input:hover {
  border-color: color-mix(in srgb, var(--c-violet) 45%, transparent);
}

.field__input:focus {
  outline: none;
  background: #fff;
  border-color: var(--c-violet);
  box-shadow: 0 0 0 4px rgba(138, 63, 160, 0.16);
}

.field__input[aria-invalid="true"] {
  border-color: #c02b57;
  box-shadow: 0 0 0 4px rgba(192, 43, 87, 0.12);
}

/* O aviso vive dentro do campo, fora do fluxo: nada se desloca quando
   ele aparece. A cápsula clara o mantém legível sobre o que foi digitado. */
.field__error {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  z-index: 2;
  transform: translateY(-50%);
  max-width: 62%;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
  background: rgba(255, 240, 244, 0.96);
  box-shadow: 0 1px 4px rgba(168, 35, 72, 0.14);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #a82348;
  pointer-events: none;
}

.field__error:empty {
  display: none;
}

/* Abre espaço para o aviso não cobrir o fim do que foi digitado */
.field__input[aria-invalid="true"] {
  padding-right: 8.5rem;
}

/* ---- Telefone com DDI ------------------------------------ */
.phone {
  display: flex;
  min-width: 0;
}

.phone__ddi {
  position: relative;
  flex: none;
  color: var(--ink);
}

.phone__select {
  height: 100%;
  min-height: 3.375rem;
  padding: 0 1.9rem 0 1.25rem;
  border: 1.5px solid rgba(61, 11, 82, 0.14);
  border-right: 0;
  border-radius: var(--r-pill) 0 0 var(--r-pill);
  background: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 1px 2px rgba(61, 11, 82, 0.04), 0 8px 20px rgba(61, 11, 82, 0.07);
  transition: border-color var(--dur-fast) var(--ease-soft);
}

.phone__select:focus {
  outline: none;
  border-color: var(--c-violet);
  position: relative;
  z-index: 1;
}

.phone__caret {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  width: 1.1rem;
  height: 1.1rem;
  transform: translateY(-50%);
  color: var(--ink-mute);
  pointer-events: none;
}

.phone__input {
  flex: 1;
  min-width: 0;
  padding-left: 1rem;
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
  border-left-color: rgba(61, 11, 82, 0.1);
}

/* No celular os cards acompanham o degrau de leitura do resto da página */
@media (max-width: 47.99rem) {
  .mirror {
    font-size: 1.0625rem;
  }
}

/* Em telas estreitas o DDI encolhe para o número caber inteiro */
@media (max-width: 26rem) {
  .field__input {
    font-size: 1rem;
    padding-inline: 0.875rem;
  }

  .phone__select {
    padding: 0 1.6rem 0 0.625rem;
    font-size: 0.9375rem;
  }

  .phone__caret {
    right: 0.4rem;
  }
}

/* Estado de sucesso — substitui o formulário no lugar */
.form-status {
  display: none;
  align-items: center;
  gap: var(--sp-s);
  padding: var(--sp-m) 0;
  text-align: left;
}

.form-status.is-on {
  display: flex;
}

.form-status__mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--c-lilac), var(--c-blush));
  color: var(--c-plum);
}

.form-status__mark svg {
  width: 1.5rem;
  height: 1.5rem;
}

.form-status__text {
  font-size: var(--t-small);
  line-height: 1.5;
}

.form-status__text b {
  display: block;
  font-size: var(--t-body);
}

.form-error-global {
  display: none;
  margin-top: var(--sp-xs);
  font-size: var(--t-micro);
  font-weight: 700;
  color: #a82348;
}

.form-error-global.is-on {
  display: block;
}

.is-sent .signup__form {
  display: none;
}

/* Realce quando o usuário chega via CTA */
@keyframes field-call {
  0%,
  100% {
    box-shadow: 0 1px 2px rgba(61, 11, 82, 0.04), 0 8px 20px rgba(61, 11, 82, 0.07);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(138, 63, 160, 0.2), 0 10px 24px rgba(61, 11, 82, 0.12);
  }
}

.signup.is-called .field__input,
.signup.is-called .phone__select {
  animation: field-call 1.4s var(--ease-soft) 2;
}

/* ---- Countdown ------------------------------------------ */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.5rem, 0.2rem + 1.4vw, 1.125rem);
  width: 100%;
  max-width: 760px;
}

/* Sem caixa: os números ficam direto sobre o gradiente, separados
   apenas por um fio de luz. */
.countdown__unit {
  position: relative;
  display: grid;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  text-align: center;
}

.countdown__unit + .countdown__unit::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(0.25rem, 0.1rem + 0.7vw, 0.5625rem));
  top: 18%;
  bottom: 22%;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

.countdown__value {
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--track-tighter);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: var(--c-white);
  text-shadow: 0 2px 12px rgba(24, 6, 40, 0.25);
}

.countdown__label {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

/* ---- Cards de identificação (Seção 4) -------------------- */
.mirror-list {
  display: grid;
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.125rem);
}

.mirror {
  position: relative;
  display: grid;
  gap: var(--sp-s);
  align-content: start;
  padding: clamp(1.375rem, 1rem + 1.2vw, 1.875rem) clamp(1.25rem, 1rem + 1vw, 1.625rem);
  border-radius: var(--r-l);
  /* Sobre a faixa escura, o card é a luz: opaco e com sombra própria */
  background: linear-gradient(150deg, #ffffff 0%, #fdf7fb 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 6px rgba(12, 2, 20, 0.18), 0 14px 34px rgba(12, 2, 20, 0.22);
  color: var(--ink);
  font-size: clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem);
  line-height: 1.55;
  transition:
    transform var(--dur-mid) var(--ease-soft),
    box-shadow var(--dur-mid) var(--ease-soft);
}

.mirror__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #fbeac2 0%, #f3c4de 52%, #d9b0ef 100%);
  color: var(--c-plum);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.75),
    0 5px 14px rgba(61, 11, 82, 0.14);
  transition: transform var(--dur-mid) var(--ease-soft);
}

.mirror__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.mirror:hover .mirror__icon {
  transform: scale(1.06) rotate(-3deg);
}

.mirror:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(12, 2, 20, 0.2), 0 20px 44px rgba(12, 2, 20, 0.28);
}

/* 2 por linha no tablet; 3 + 2 centralizados no desktop */
@media (min-width: 40rem) {
  .mirror-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mirror {
    grid-column: span 2;
  }
}

/* Só no tablet o card órfão vai para o centro — no desktop quem manda
   é a regra de 6 colunas abaixo, e as duas não podem se cruzar. */
@media (min-width: 40rem) and (max-width: 61.99rem) {
  .mirror:last-child:nth-child(odd) {
    grid-column: 2 / span 2;
  }
}

@media (min-width: 62rem) {
  .mirror-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mirror:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .mirror:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

/* ---- Régua de separação ---------------------------------- */
.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
