/* ============================================================
   FLANGU CONTACT PAGE — contact.css
   Self-contained contact-form styles that layer on top of
   landing.css and landing_waitlist.css. All design tokens
   (--c-navy, --sp-*, --r-*, etc.) are defined in landing.css;
   --c-error and --c-navy-38 are defined in landing_waitlist.css
   and reused here without duplication.
   BEM prefix: ct- (contact)
   ============================================================ */

/* ── 1. PAGE LAYOUT ─────────────────────────────────────────── */

.ct-layout {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(72px + var(--sp-xl)) var(--sp-lg) var(--sp-2xl);
}

.ct-header {
  /* .dc-article__header already supplies margin/padding/border —
     nothing additional needed here. Class kept for page-specific overrides. */
}

/* ── 2. FORM CARD ───────────────────────────────────────────── */

.ct-panel {
  background: var(--c-white);
  border: 1px solid var(--c-navy-08);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  padding: var(--sp-xl);
}

.ct-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

/* ── 3. FIELDS ──────────────────────────────────────────────── */

.ct-field {
  display: flex;
  flex-direction: column;
}

.ct-field__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: var(--sp-xs);
}

.ct-field__req {
  color: var(--c-error);
}

.ct-field__input,
.ct-field__select,
.ct-field__textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--c-navy-08);
  border-radius: var(--r-sm);
  background: var(--c-white);
  outline: none;
  font-family: inherit;
  font-size: 16px; /* >=16px avoids iOS zoom-on-focus */
  font-weight: 500;
  line-height: 1.4;
  color: var(--c-navy);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.ct-field__textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.ct-field__input:hover,
.ct-field__select:hover,
.ct-field__textarea:hover {
  border-color: var(--c-navy-12);
}

.ct-field__input:focus,
.ct-field__select:focus,
.ct-field__textarea:focus {
  border-color: var(--c-mainblue);
  box-shadow: 0 0 0 4px var(--c-mainblue-08);
}

.ct-field__input::placeholder,
.ct-field__textarea::placeholder {
  color: var(--c-navy-38);
  font-weight: 400;
}

/* Chrome's yellow autofill fill would break the white field */
.ct-field__input:-webkit-autofill,
.ct-field__input:-webkit-autofill:hover,
.ct-field__input:-webkit-autofill:focus {
  -webkit-box-shadow: inset 0 0 0 1000px var(--c-white);
  -webkit-text-fill-color: var(--c-navy);
  transition: background-color 9999s ease-out;
}

.ct-field.is-invalid .ct-field__input,
.ct-field.is-invalid .ct-field__select,
.ct-field.is-invalid .ct-field__textarea {
  border-color: var(--c-error);
}

.ct-field.is-invalid .ct-field__input:focus,
.ct-field.is-invalid .ct-field__select:focus,
.ct-field.is-invalid .ct-field__textarea:focus {
  box-shadow: 0 0 0 4px rgba(224, 82, 82, 0.12);
}

.ct-field__error {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-error);
  margin-top: var(--sp-2xs);
}

.ct-field__error[hidden] {
  display: none;
}

.ct-field__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-sm);
  margin-top: var(--sp-2xs);
}

.ct-field__counter {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 12px;
  color: var(--c-navy);
  opacity: 0.45;
}

.ct-field__counter.is-near-limit {
  opacity: 1;
  color: var(--c-error);
  font-weight: 700;
}

/* ── 3b. CATEGORY-CONDITIONAL NOTICE (delete-account info) ──── */

.ct-notice {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  background: var(--c-mainblue-04);
  border: 1px solid var(--c-navy-08);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  margin-top: calc(var(--sp-lg) * -1 + var(--sp-sm));
}

.ct-notice[hidden] {
  display: none;
}

.ct-notice__heading {
  font-size: 16px;
  font-weight: 900;
  color: var(--c-navy);
}

.ct-notice__subheading {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-navy);
  margin-top: var(--sp-2xs);
}

.ct-notice__lead,
.ct-notice__body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-navy);
  opacity: 0.8;
}

.ct-notice__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-navy);
  opacity: 0.8;
  padding-left: 1.25em;
}

.ct-notice__list--ordered {
  list-style: decimal;
}

.ct-notice__list:not(.ct-notice__list--ordered) {
  list-style: disc;
}

.ct-notice__list li {
  padding-left: var(--sp-2xs);
}

.ct-notice__list strong,
.ct-notice__body strong {
  opacity: 1;
}

/* ── 4. HONEYPOT (off-screen, not display:none) ─────────────── */

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

/* ── 5. TURNSTILE + FORM-LEVEL ALERT ────────────────────────── */

.ct-form__turnstile {
  display: flex;
  justify-content: flex-start;
}

.ct-form__turnstile:not(:empty) {
  margin-top: var(--sp-2xs);
}

.ct-form__alert {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-error);
}

.ct-form__alert[hidden] {
  display: none;
}

/* ── 6. SUBMIT BUTTON ───────────────────────────────────────── */

.ct-form__submit {
  align-self: flex-start;
}

.ct-form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── 7. SUCCESS STATE ────────────────────────────────────────── */

.ct-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--sp-lg) 0;
}

.ct-success[hidden] {
  display: none;
}

.ct-success__icon {
  width: 48px;
  height: 48px;
  color: var(--c-success);
  margin-bottom: var(--sp-md);
}

.ct-success__title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--c-navy);
  margin-bottom: var(--sp-xs);
}

.ct-success__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-navy);
  opacity: 0.6;
  margin-bottom: var(--sp-lg);
  max-width: 420px;
}

/* ── 8. ASIDE ────────────────────────────────────────────────── */

.ct-aside {
  margin-top: var(--sp-lg);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-navy);
  opacity: 0.6;
  text-align: center;
}

.ct-aside__link {
  color: var(--c-mainblue);
  font-weight: 700;
  opacity: 1;
}

.ct-aside__link:hover {
  color: var(--c-mainblue-deep);
}

/* ── 9. RESPONSIVE ───────────────────────────────────────────── */

@media (max-width: 767px) {
  .ct-layout {
    padding: calc(72px + var(--sp-md)) var(--sp-md) var(--sp-xl);
  }

  .ct-panel {
    padding: var(--sp-lg);
  }

  .ct-form__submit {
    align-self: stretch;
    justify-content: center;
  }
}

/* ── 10. REDUCED MOTION ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .ct-field__input,
  .ct-field__select,
  .ct-field__textarea {
    transition: none !important;
  }
}
