/* ════════════════════════════════════════════════════
   CONTACT PAGE
   ════════════════════════════════════════════════════ */

/* ─── Hero ─── */

.ct-hero {
  background: var(--void);
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding-block: clamp(9rem, 16vh, 14rem) clamp(5rem, 8vh, 8rem);
  position: relative;
  overflow: hidden;
}

.ct-hero-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ct-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.ct-glow-1 {
  width: 70vw;
  height: 70vw;
  top: -25%;
  left: -15%;
  background: radial-gradient(circle, rgba(36,99,235,.2) 0%, transparent 60%);
}

.ct-glow-2 {
  width: 55vw;
  height: 55vw;
  bottom: -15%;
  right: -10%;
  background: radial-gradient(circle, rgba(6,182,212,.1) 0%, transparent 60%);
}

.ct-hero-inner {
  position: relative;
  z-index: 1;
}

.ct-hero-left {
  max-width: 680px;
  margin-bottom: clamp(3rem, 6vh, 5rem);
}

.ct-eyebrow {
  margin-bottom: 1.5rem;
  opacity: 0;
}

.ct-h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.06;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.ct-hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  color: var(--white-60, rgba(255,255,255,.6));
  line-height: 1.8;
  max-width: 54ch;
  opacity: 0;
}

/* ─── Info chips ─── */

.ct-chips-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.ct-chip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--white-08);
  border-radius: 14px;
  padding: 1rem 1.35rem;
  flex: 1;
  min-width: 210px;
  opacity: 0;
  transition: border-color .2s, background .2s;
}

.ct-chip:hover {
  border-color: var(--white-15);
  background: var(--white-08);
}

.ct-chip-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: rgba(36,99,235,.15);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt-bright);
}

.ct-chip-text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.ct-chip-lbl {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-40, rgba(255,255,255,.4));
}

.ct-chip-val {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white-90);
}

/* ─── Form section ─── */

.ct-section {
  background: var(--navy);
  padding-block: var(--sec-py);
}

.ct-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

/* ─── Sidebar ─── */

.ct-sidebar-inner {
  position: sticky;
  top: 110px;
}

.ct-sidebar-h {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.ct-sidebar-p {
  font-size: 0.9rem;
  color: var(--white-50);
  line-height: 1.7;
  margin-bottom: 2.25rem;
  max-width: 36ch;
}

.ct-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
}

.ct-step {
  display: flex;
  gap: 1rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--white-08);
}

.ct-step:first-child { border-top: 1px solid var(--white-08); }

.ct-step-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--cobalt-bright);
  min-width: 26px;
  padding-top: 4px;
  opacity: 0.85;
}

.ct-step-content strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white-90);
  margin-bottom: 0.3rem;
}

.ct-step-content p {
  font-size: 0.8rem;
  color: var(--white-50);
  line-height: 1.6;
  margin: 0;
}

.ct-tip {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(36,99,235,.07);
  border: 1px solid rgba(36,99,235,.2);
  border-radius: 10px;
  padding: 1rem 1.15rem;
}

.ct-tip svg {
  min-width: 14px;
  margin-top: 2px;
  color: var(--cobalt-bright);
  opacity: 0.75;
}

.ct-tip p {
  font-size: 0.78rem;
  color: var(--white-50);
  line-height: 1.65;
  margin: 0;
}

/* ─── Form card ─── */

.ct-form-wrap { position: relative; }

.ct-form {
  background: var(--navy-mid);
  border: 1px solid var(--white-08);
  border-radius: 20px;
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

.ct-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ─── Fields ─── */

.ct-field {
  position: relative;
}

.ct-field--full { grid-column: 1 / -1; }

.ct-field input,
.ct-field textarea,
.ct-field select {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 1.25rem 1rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--white-90);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.ct-field input:focus,
.ct-field textarea:focus,
.ct-field select:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(36,99,235,.18);
  background: rgba(255,255,255,.06);
}

/* Floating label — placed after input in DOM for + selector */
.ct-field label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--white-40, rgba(255,255,255,.4));
  pointer-events: none;
  transition: top .18s ease, font-size .18s ease, color .18s ease, transform .18s ease;
  transform-origin: left top;
  white-space: nowrap;
}

/* Textarea: label at top, not vertically centered */
.ct-field--textarea label {
  top: 1.25rem;
  transform: none;
}

/* Float up: input */
.ct-field input:focus + label,
.ct-field input:not(:placeholder-shown) + label {
  top: 0.4rem;
  transform: scale(0.72);
  color: var(--cobalt-bright);
}

/* Float up: textarea */
.ct-field textarea:focus + label,
.ct-field textarea:not(:placeholder-shown) + label {
  top: 0.35rem;
  font-size: 0.65rem;
  transform: none;
  color: var(--cobalt-bright);
  letter-spacing: 0.03em;
}

/* Select: label floats via .has-value class (JS-driven) */
.ct-field--select label {
  top: 50%;
  transform: translateY(-50%);
}

.ct-field--select select:focus + label,
.ct-field--select.has-value label {
  top: 0.4rem;
  transform: scale(0.72);
  color: var(--cobalt-bright);
}

/* Select dropdown arrow */
.ct-select-caret {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white-40);
  pointer-events: none;
  transition: color .2s, transform .2s;
}

.ct-field--select select:focus ~ .ct-select-caret {
  color: var(--cobalt-bright);
  transform: translateY(-50%) rotate(180deg);
}

/* Textarea */
.ct-field textarea {
  resize: none;
  padding-top: 1.5rem;
  line-height: 1.65;
  padding-bottom: 2.25rem; /* room for char counter */
}

/* Character counter */
.ct-char-wrap {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  pointer-events: none;
}

.ct-char-count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--white-25, rgba(255,255,255,.25));
  transition: color .2s;
  letter-spacing: 0.05em;
}

.ct-char-count.warn { color: var(--warn-amber); }

/* Error state */
.ct-field--error input,
.ct-field--error textarea,
.ct-field--error select {
  border-color: var(--err-red);
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}

.ct-field--error label { color: var(--err-red) !important; }

/* ─── Form footer ─── */

.ct-form-footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ct-form-note {
  font-size: 0.75rem;
  color: var(--white-30);
  line-height: 1.5;
  flex: 1;
  min-width: 160px;
}

/* ─── Submit button ─── */

.ct-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 2.25rem;
  background: var(--cobalt);
  border: 1px solid var(--cobalt);
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  overflow: hidden;
  transition: background .2s, transform .15s, box-shadow .2s, border-color .2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.ct-submit:hover:not(:disabled) {
  background: var(--cobalt-bright);
  border-color: var(--cobalt-bright);
  box-shadow: 0 6px 28px rgba(36,99,235,.4);
  transform: translateY(-1px);
}

.ct-submit:active:not(:disabled) { transform: translateY(0); }

.ct-submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Spinner */
.ct-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ctSpin .65s linear infinite;
  flex-shrink: 0;
}

@keyframes ctSpin { to { transform: rotate(360deg); } }

.ct-submit[data-state="loading"] .ct-spinner         { display: block; }
.ct-submit[data-state="loading"] .ct-submit-icon-wrap { display: none; }
.ct-submit[data-state="loading"] .ct-submit-text      { opacity: .75; }

.ct-submit[data-state="error"] {
  background: var(--err-red);
  border-color: var(--err-red);
}

/* ─── Success state ─── */

.ct-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(3.5rem, 7vw, 6rem) clamp(2rem, 5vw, 5rem);
  background: var(--navy-mid);
  border: 1px solid var(--white-08);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  opacity: 0;
}

.ct-success.active { display: flex; }

.ct-success-icon-wrap {
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
}

.ct-success-svg { width: 100%; height: 100%; }

.ct-success-h {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 0.8rem;
}

.ct-success-p {
  font-size: 0.95rem;
  color: var(--white-50);
  line-height: 1.75;
  max-width: 40ch;
  margin-bottom: 2.25rem;
}

.ct-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cobalt-bright);
  text-decoration: none;
  padding: 0.65rem 1.35rem;
  border: 1px solid rgba(59,130,246,.3);
  border-radius: 8px;
  transition: background .2s, border-color .2s;
}

.ct-back-link:hover {
  background: rgba(59,130,246,.1);
  border-color: var(--cobalt-bright);
}

/* ─── Page footer ─── */

.ct-page-footer {
  background: var(--navy-mid);
  border-top: 1px solid var(--white-08);
  padding-block: 1.75rem;
}

.ct-page-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ct-page-footer-copy {
  font-size: 0.78rem;
  color: var(--white-30);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ─── Responsive ─── */

@media (max-width: 1024px) {
  .ct-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .ct-sidebar-inner { position: static; }
  .ct-sidebar-p     { max-width: 100%; }

  .ct-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .ct-step {
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: none;
    border-right: 1px solid var(--white-08);
    padding-inline: 1.25rem;
  }

  .ct-step:last-child { border-right: none; }
  .ct-step:first-child { border-top: none; padding-left: 0; }
}

@media (max-width: 768px) {
  .ct-chips-row {
    flex-direction: column;
  }

  .ct-chip { min-width: unset; }

  .ct-form-grid {
    grid-template-columns: 1fr;
  }

  .ct-steps {
    grid-template-columns: 1fr;
  }

  .ct-step {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--white-08);
    padding-inline: 0;
    gap: 1rem;
  }

  .ct-step:first-child { border-top: 1px solid var(--white-08); }

  .ct-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .ct-submit {
    width: 100%;
    justify-content: center;
  }

  .ct-page-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
