/* /creator-program only. Builds on home.css (tokens, type, buttons, .lead-status). */

.cp {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 480px at 18% -10%, rgba(255, 210, 63, 0.28), transparent 62%),
    radial-gradient(600px 420px at 100% 30%, rgba(255, 210, 63, 0.1), transparent 70%),
    var(--paper);
}
.cp::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(20, 18, 10, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 18, 10, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 20%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 30% 20%, #000 15%, transparent 75%);
  pointer-events: none;
}

.cp-top__inner { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 6px; }
.cp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.cp-back:hover { border-color: var(--text); color: var(--text); }
.cp-back svg { width: 16px; height: 16px; }

.cp-main { flex: 1; padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.cp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.cp-copy { padding-top: clamp(0rem, 2vw, 1.5rem); }
.cp-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.3rem, 3.6vw + 1rem, 4.2rem);
  line-height: 1;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.cp-lede { margin-top: 1.25rem; max-width: 46ch; color: var(--muted); font-size: clamp(1.02rem, 0.3vw + 0.96rem, 1.15rem); line-height: 1.6; }
.cp-points { display: grid; gap: 0.7rem; margin-top: 1.75rem; }
.cp-points li { position: relative; padding-left: 1.9rem; color: var(--text-2); font-weight: 500; }
.cp-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23ffd23f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

.cp-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--shadow-2);
}
.cp-form { display: grid; gap: 1.05rem; }
.cp-card__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font: 700 1.3rem/1.2 var(--font-display);
  letter-spacing: -0.02em;
}
.cp-card__title span { color: var(--muted); font: 500 0.85rem/1 var(--font-body); letter-spacing: 0; }
.cp .field { display: grid; gap: 0.4rem; }
.cp .field > label { font-size: 0.9rem; font-weight: 600; color: var(--text-2); }
.cp-hint { color: var(--muted); font-size: 0.82rem; }

/* Input with an icon or currency prefix; the whole box shows focus and errors */
.affix {
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--paper);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.affix:hover { border-color: #bdb7a8; }
.affix:focus-within { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px var(--signal-soft); }
.affix:has(input[aria-invalid="true"]) { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(217, 68, 61, 0.12); }
.affix:has(input.is-ok) .affix__ic { background: var(--signal); color: var(--ink); }
.affix__ic {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-left: 0.55rem;
  border-radius: 9px;
  background: var(--ink);
  color: var(--signal);
  transition: background-color 0.25s, color 0.25s;
}
.affix__ic svg { width: 16px; height: 16px; }
.cp .field > .affix,
.rate > .affix { min-width: 0; }
.affix input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 0.9rem 0 0.7rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 400 1rem/1.2 var(--font-body);
  -webkit-appearance: none;
  appearance: none;
}
.affix input::placeholder { color: #98948a; }
.affix input:focus { outline: none; }
.affix input:disabled { opacity: 0.6; }

.cp-rates,
.cp-group { min-width: 0; margin: 0.2rem 0 0; padding: 0; border: 0; }
.cp-rates legend,
.cp-group legend { padding: 0; margin-bottom: 0.55rem; font-size: 0.9rem; font-weight: 600; color: var(--text-2); }
.cp-rates legend span,
.cp-group legend span { color: var(--muted); font-weight: 500; }
.cp-group legend span::before { content: "· "; }
.cp-rates legend span::before { content: ""; }

/* Telegram and WhatsApp: both visible, at least one needed */
.cp-reach { display: grid; gap: 0.5rem; }
.cp-reach .affix { min-width: 0; cursor: text; }
.affix__ic--wa { color: #3ddc84; }
.affix:has(input.is-ok) .affix__ic--wa { color: var(--ink); }

/* Niche chips (checkboxes) */
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper);
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.chip:hover span { border-color: #bdb7a8; color: var(--text); }
.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip input:checked + span::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: -0.15rem;
  border-radius: 50%;
  background: var(--signal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23141206' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.chip input:active + span { transform: scale(0.96); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.cp-group:has(.chips[aria-invalid="true"]) .chip span { border-color: var(--bad); }
.cp-other { margin-top: 0.55rem; animation: cp-rise 0.35s var(--ease) both; }
.cp-other[hidden] { display: none; }
.cp-other input { padding-left: 0.95rem; }
.cp-rates__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.rate { display: grid; gap: 0.3rem; min-width: 0; }
.rate__name { color: var(--text-2); font-size: 0.84rem; font-weight: 500; }
.affix--money { min-height: 48px; }
.affix--money input { height: 46px; padding-left: 0.25rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.affix__cur { flex-shrink: 0; padding-left: 0.85rem; color: var(--muted); font-weight: 600; }

.cp-form .btn { margin-top: 0.3rem; }
.cp .lead-status { margin-top: 0; }
.cp-note { color: var(--muted); font-size: 0.84rem; text-align: center; line-height: 1.45; }

.cp-foot { padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.cp-foot__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cp-foot a { margin-left: 1rem; color: var(--text-2); text-decoration: none; }
.cp-foot a:first-child { margin-left: 0; }
.cp-foot a:hover { color: var(--text); }

/* Entrance: copy and card rise in once */
@keyframes cp-rise { from { opacity: 0; transform: translateY(14px); } }
.cp-copy, .cp-card { animation: cp-rise 0.8s var(--ease) both; }
.cp-card { animation-delay: 0.08s; }

@media (max-width: 900px) {
  .cp-grid { grid-template-columns: minmax(0, 1fr); }
  .cp-copy { max-width: 40rem; }
  .cp-card { max-width: 34rem; }
}
@media (max-width: 520px) {
  .cp-main { padding-top: 1.5rem; }
  .cp-card { margin-top: -0.25rem; }
  .cp-card { padding: 1.15rem; border-radius: var(--r-lg); }
  .cp-rates__grid { gap: 0.5rem; }
}
@media (max-width: 340px) {
  .cp-rates__grid { grid-template-columns: minmax(0, 1fr); }
  .cp-reach .affix input { padding-right: 0.6rem; font-size: 0.94rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-copy, .cp-card { animation: none; }
}
