/* ============================================================
   HYPNOS CREATIVE — Lead form (#lead-form)
   Lives inside .contact (background var(--ink), white text).
   Brand tokens come from style.css (:root). Prefix: lf-
   ============================================================ */

.lead-form {
  --lf-field-bg: rgba(255, 255, 255, 0.08);
  --lf-field-border: rgba(255, 255, 255, 0.28);
  --lf-field-border-hover: rgba(255, 255, 255, 0.45);
  --lf-placeholder: rgba(255, 255, 255, 0.5);
  /* Coral (#EF4759) is 3.5:1 on ink; this lifted coral reads at 5.7:1 for
     small error text. Field borders still use the brand coral. */
  --lf-error-text: #FF8A96;
  color-scheme: dark;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px 24px;
  max-width: 760px;
  margin-top: 40px;
  text-align: left;
}
.lead-form[hidden] { display: none; }

@media (min-width: 720px) {
  .lead-form { grid-template-columns: 1fr 1fr; }
  .lf-field--full { grid-column: 1 / -1; }
}

/* ---------- Field ---------- */
.lf-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.lf-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--white);
}
.lf-req {
  color: var(--orange);
  margin-left: 2px;
}
.lf-hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--mist);
  margin: 0;
}
.lf-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.lf-counter {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

/* ---------- Controls ---------- */
.lf-input,
.lf-select,
.lf-textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  color: var(--white);
  background-color: var(--lf-field-bg);
  border: 1px solid var(--lf-field-border);
  border-radius: var(--radius);
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.lf-input::placeholder,
.lf-textarea::placeholder {
  color: var(--lf-placeholder);
  opacity: 1;
}
.lf-input:hover,
.lf-select:hover,
.lf-textarea:hover {
  border-color: var(--lf-field-border-hover);
}
.lf-input:focus-visible,
.lf-select:focus-visible,
.lf-textarea:focus-visible,
.lf-check input:focus-visible,
.lead-form .btn:focus-visible,
.lf-success:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-color: var(--orange);
}
/* Browsers without :focus-visible support */
.lf-input:focus,
.lf-select:focus,
.lf-textarea:focus {
  border-color: var(--orange);
}
.lf-input:-webkit-autofill,
.lf-textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--white);
  -webkit-box-shadow: 0 0 0 1000px #23407a inset;
  caret-color: var(--white);
}

.lf-select {
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 5l4.5 4.5L11.5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
}
.lf-select option {
  color: var(--ink);
  background: var(--white);
}

.lf-textarea {
  min-height: 150px;
  resize: vertical;
}

/* ---------- Error state ---------- */
.lf-field.is-invalid .lf-input,
.lf-field.is-invalid .lf-select,
.lf-field.is-invalid .lf-textarea {
  border-color: var(--coral);
}
.lf-field.is-invalid .lf-check input {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}
.lf-error {
  font-size: 14px;
  line-height: 1.45;
  color: var(--lf-error-text);
  margin: 0;
}
.lf-error[hidden] { display: none; }

/* ---------- Consent ---------- */
.lf-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--white);
  cursor: pointer;
}
.lf-check input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--orange);
  cursor: pointer;
}
.lf-check a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.lf-check a:hover { color: var(--orange); }

/* ---------- Actions / status ---------- */
.lf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 6px;
}
.lead-form .btn {
  font-family: var(--sans);
  min-width: 180px;
  cursor: pointer;
}
.lead-form .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}
.lf-status {
  flex: 1 1 260px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mist);
  margin: 0;
}
.lf-status.is-error { color: var(--lf-error-text); }
.lf-status a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-underline-offset: 3px;
}

/* ---------- Honeypot (never shown to people) ---------- */
.lf-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

/* ---------- Success state (replaces the form) ---------- */
.lf-success {
  max-width: 62ch;
  margin-top: 40px;
  padding: 28px 30px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--lf-field-border, rgba(255, 255, 255, 0.28));
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
}
.lf-success[hidden] { display: none; }
.lf-success .meta {
  display: block;
  margin-bottom: 10px;
  color: var(--mist);
}
.lf-success p {
  font-size: 19px;
  line-height: 1.55;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .lf-input,
  .lf-select,
  .lf-textarea { transition: none; }
}
