/* ============================================================
   CONTACT.CSS — TCS Intake Modal
   ============================================================ */

/* ── OVERLAY ─────────────────────────────────────────────── */
.tcs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.tcs-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── MODAL ───────────────────────────────────────────────── */
.tcs-modal {
  background: #0F0F14;
  border: 1px solid rgba(237, 234, 229, 0.07);
  border-radius: 14px;
  padding: 22px 24px 18px;
  width: 100%;
  max-width: 560px;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 24px 80px rgba(0,0,0,0.7),
    0 0 60px rgba(124, 255, 168, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.04);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Bricolage Grotesque', sans-serif;
}
.tcs-overlay.active .tcs-modal {
  transform: translateY(0) scale(1);
}

/* ── CLOSE BUTTON ────────────────────────────────────────── */
.tcs-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}
.tcs-close-btn:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}

/* ── HEADER ──────────────────────────────────────────────── */
.tcs-modal-header {
  text-align: center;
  margin-bottom: 10px;
}
.tcs-modal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(124, 255, 168, 0.8);
  margin-bottom: 6px;
}
.tcs-modal-eyebrow::before,
.tcs-modal-eyebrow::after {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: rgba(124, 255, 168, 0.3);
}
.tcs-modal-headline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: #EDEAE5;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
/* Sub text hidden — too much vertical space */
.tcs-modal-sub { display: none; }

/* ── DIVIDER ─────────────────────────────────────────────── */
.tcs-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(237, 234, 229, 0.07), transparent);
  margin-bottom: 10px;
}

/* ── STEP LABELS hidden — field labels are self-explanatory ─ */
.form-step-label { display: none; }

/* ── FIELD LAYOUT ────────────────────────────────────────── */
.tcs-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tcs-field-wrap {
  margin-bottom: 7px;
  position: relative;
}

/* ── LABELS ──────────────────────────────────────────────── */
.tcs-modal label {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(237, 234, 229, 0.5);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.tcs-modal label .req {
  color: rgba(124, 255, 168, 0.8);
  margin-left: 2px;
}

/* ── INPUTS / SELECT / TEXTAREA ──────────────────────────── */
.tcs-modal input[type="text"],
.tcs-modal input[type="email"],
.tcs-modal input[type="url"],
.tcs-modal input[type="tel"],
.tcs-modal select,
.tcs-modal textarea {
  width: 100%;
  background: rgba(237, 234, 229, 0.04);
  border: 1px solid rgba(237, 234, 229, 0.09);
  border-radius: 7px;
  padding: 7px 10px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  color: #EDEAE5;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.tcs-modal input::placeholder,
.tcs-modal textarea::placeholder {
  color: rgba(237, 234, 229, 0.2);
}
.tcs-modal input:hover,
.tcs-modal select:hover,
.tcs-modal textarea:hover {
  border-color: rgba(237, 234, 229, 0.16);
  background: rgba(237, 234, 229, 0.06);
}
.tcs-modal input:focus,
.tcs-modal select:focus,
.tcs-modal textarea:focus {
  border-color: rgba(124, 255, 168, 0.5);
  background: rgba(237, 234, 229, 0.06);
  box-shadow: 0 0 0 3px rgba(124, 255, 168, 0.08);
}

/* Select arrow */
.tcs-select-wrap { position: relative; }
.tcs-select-wrap::after {
  content: '';
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(237, 234, 229, 0.3);
  pointer-events: none;
}
.tcs-modal select option { background: #13131a; color: #EDEAE5; }

.tcs-modal textarea {
  resize: none;
  min-height: 48px;
  line-height: 1.5;
}

/* ── PILLS ───────────────────────────────────────────────── */
.tcs-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.tcs-pill-input { display: none; }
.tcs-pill-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(237, 234, 229, 0.04);
  border: 1px solid rgba(237, 234, 229, 0.09);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(237, 234, 229, 0.5);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}
.tcs-pill-label:hover {
  border-color: rgba(124, 255, 168, 0.4);
  color: rgba(237, 234, 229, 0.85);
  background: rgba(124, 255, 168, 0.06);
}
.tcs-pill-input:checked + .tcs-pill-label {
  background: rgba(124, 255, 168, 0.1);
  border-color: rgba(124, 255, 168, 0.5);
  color: #7CFFA8;
}

/* ── ERROR STATE ─────────────────────────────────────────── */
.tcs-field-error {
  font-size: 0.62rem;
  color: #f87171;
  margin-top: 3px;
  display: none;
}
.tcs-field-wrap.invalid input,
.tcs-field-wrap.invalid select,
.tcs-field-wrap.invalid textarea {
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.08);
}
.tcs-field-wrap.invalid .tcs-field-error { display: block; }

/* ── CONSENT CHECKBOX ────────────────────────────────────── */
.tcs-consent-wrap {
  margin-top: 8px;
  margin-bottom: 2px;
}
.tcs-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.62rem;
  color: rgba(237, 234, 229, 0.38);
  line-height: 1.65;
  letter-spacing: 0.01em;
}
.tcs-consent-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(237, 234, 229, 0.04);
  border: 1px solid rgba(237, 234, 229, 0.18);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.tcs-consent-label input[type="checkbox"]:checked {
  background: rgba(124, 255, 168, 0.12);
  border-color: rgba(124, 255, 168, 0.55);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='%237CFFA8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 8px 7px;
}
.tcs-consent-wrap.invalid .tcs-consent-label input[type="checkbox"] {
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.08);
}

/* ── SUBMIT ──────────────────────────────────────────────── */
.tcs-submit-btn {
  width: 100%;
  margin-top: 10px;
  padding: 11px 20px;
  background: #C4963B;
  color: #06060A;
  border: none;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.tcs-submit-btn:hover {
  background: #EDEAE5;
  transform: translateY(-1px);
}
.tcs-arrow { transition: transform 0.2s ease; }
.tcs-submit-btn:hover .tcs-arrow { transform: translateX(4px); }

.tcs-form-footer {
  text-align: center;
  font-size: 0.6rem;
  color: rgba(237, 234, 229, 0.2);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* ── CONFIRM STATE ───────────────────────────────────────── */
.tcs-confirm-state {
  display: none;
  text-align: center;
  padding: 20px 0 12px;
}
.tcs-confirm-icon {
  font-size: 2rem;
  color: #7CFFA8;
  margin-bottom: 16px;
  display: block;
}
.tcs-confirm-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 800;
  color: #EDEAE5;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.tcs-confirm-sub {
  font-size: 0.9rem;
  color: rgba(237, 234, 229, 0.45);
  line-height: 1.7;
  max-width: 320px;
  margin: 0 auto;
  font-weight: 300;
}

/* ── MOBILE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Overlay scrolls on mobile so tall forms don't clip */
  .tcs-overlay {
    align-items: flex-start;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tcs-modal {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    max-width: 100%;
    width: 100%;
    min-height: 100svh;
    padding: 24px 20px 32px;
    transform: translateY(40px) scale(1);
  }
  .tcs-overlay.active .tcs-modal {
    transform: translateY(0) scale(1);
  }

  /* iOS: font-size 16px prevents auto-zoom on input focus */
  .tcs-modal input[type="text"],
  .tcs-modal input[type="email"],
  .tcs-modal input[type="url"],
  .tcs-modal input[type="tel"],
  .tcs-modal select,
  .tcs-modal textarea {
    font-size: 16px;
    padding: 10px 12px;
  }

  /* Larger close button for touch */
  .tcs-close-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
    top: 14px;
    right: 16px;
  }

  .tcs-modal-headline { font-size: clamp(1.3rem, 5vw, 1.6rem); }

  /* First/last name side by side on wider phones, stacked on small */
  .tcs-field-row { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Bigger touch targets on pills */
  .tcs-pill-label {
    padding: 7px 14px;
    font-size: 0.78rem;
  }

  /* Submit button — full height, easy tap */
  .tcs-submit-btn {
    padding: 15px 20px;
    font-size: 0.76rem;
    margin-top: 14px;
  }

  .tcs-form-footer { margin-top: 12px; font-size: 0.62rem; }
}

@media (max-width: 400px) {
  .tcs-field-row { grid-template-columns: 1fr; }
  .tcs-modal { padding: 20px 16px 28px; }
}
