/* ==========================================================================
   contact.css — BUSYTIZE CONTACT / QUOTATION
   Light mood, techie vibe. Same palette as the design system, more
   interactive. Terminal-window card, field indexing, focus glow, status board.
   ========================================================================== */

/* --- Section shell: subtle code-grid backdrop --- */
.contact-hero-split {
  position: relative;
}

.contact-hero-split::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(46, 34, 28, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
}

/* --- Terminal window card --- */
.contact-card-form {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--border-stone);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(46, 34, 28, 0.10);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-card-form:hover {
  transform: translateY(-4px);
  box-shadow: 0 34px 70px rgba(46, 34, 28, 0.14);
}

/* Window chrome bar */
.form-window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid #EFE9E3;
  background: #FAF8F6;
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-stone);
  transition: transform var(--transition-fast);
}

.window-dots span:nth-child(1) { background: #FF6B5E; }
.window-dots span:nth-child(2) { background: #FFB23E; }
.window-dots span:nth-child(3) { background: #3DC97B; }

.window-title {
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-title::before {
  content: '❯ ';
  color: var(--accent-coral);
}

.window-status {
  margin-left: auto;
  color: #3DC97B;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.window-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3DC97B;
  box-shadow: 0 0 8px rgba(61, 201, 123, 0.8);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Form body */
.contact-card-form form {
  padding: 18px 22px 20px;
}

/* --- Live completion progress --- */
.form-progress {
  position: relative;
  height: 6px;
  background: #F0EAE3;
  overflow: hidden;
}

.form-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-hover));
  border-radius: 0 6px 6px 0;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-progress-fill.done {
  background: linear-gradient(90deg, #2F9E63, #3DC97B);
}

.form-progress-label {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-code);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: #FBF9F7;
  padding: 0 4px;
  transition: color 0.3s ease;
}

.form-progress-label.done {
  color: #2F9E63;
}

/* --- Fields --- */
.form-group {
  position: relative;
  margin-bottom: 10px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-code);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--bg-espresso);
  margin-bottom: 5px;
}

.form-label .field-index {
  color: #C9BEB6;
  font-weight: 500;
  letter-spacing: 0;
}

.form-label .field-required {
  color: var(--accent-coral);
}

.input-wrap {
  position: relative;
}

/* Corner tick indicator that lights up on focus */
.input-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--border-stone);
  transition: all 0.25s ease;
  pointer-events: none;
}

.input-wrap:focus-within::after {
  background: var(--accent-coral);
  box-shadow: 0 0 0 4px rgba(255, 96, 68, 0.18);
  transform: translateY(-50%) rotate(45deg);
}

/* Valid state: tick becomes a green check */
.input-wrap.is-valid::after {
  content: '✓';
  width: auto;
  height: auto;
  font-family: var(--font-code);
  font-size: 0.9rem;
  font-weight: 700;
  color: #2F9E63;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  transform: translateY(-50%);
  animation: check-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes check-pop {
  0% { transform: translateY(-50%) scale(0); }
  70% { transform: translateY(-50%) scale(1.3); }
  100% { transform: translateY(-50%) scale(1); }
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  background: #FBF9F7;
  border: 1px solid var(--border-stone);
  border-left: 3px solid var(--border-stone);
  border-radius: 10px;
  color: var(--bg-espresso);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: all 0.25s ease;
  caret-color: var(--accent-coral);
}

.form-control::placeholder {
  color: #B5A9A1;
}

.form-control:hover {
  border-color: #D8CFC7;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-coral);
  border-left-color: var(--accent-coral);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(255, 96, 68, 0.10),
              0 8px 24px rgba(46, 34, 28, 0.06);
}

textarea.form-control {
  min-height: 64px;
  resize: vertical;
  line-height: 1.55;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236E6159' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

select.form-control option {
  color: var(--bg-espresso);
  background: #FFFFFF;
}

/* Character counter */
.char-counter {
  display: block;
  text-align: right;
  font-family: var(--font-code);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 6px;
}

.char-counter.warn {
  color: var(--accent-coral);
  font-weight: 600;
}

/* --- Live console helper line --- */
.form-console {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: #F4F1EC;
  border-top: 1px solid #EDE7E0;
  border-bottom: 1px solid var(--border-stone);
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--text-muted);
  min-height: 34px;
  transition: background var(--transition-fast);
}

.form-console .console-prompt {
  color: var(--accent-coral);
  font-weight: 700;
  flex-shrink: 0;
}

.form-console .console-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-console .console-text .console-hl {
  color: var(--bg-espresso);
  font-weight: 700;
}

.form-console.success {
  background: #F0F7F2;
  border-color: #CBE7D4;
  color: #2F9E63;
}

.form-console.success .console-prompt {
  color: #2F9E63;
}

/* Phone error */
.phone-error {
  color: #EF4444;
  font-size: 0.76rem;
  font-family: var(--font-code);
  font-weight: 600;
  display: none;
  margin-top: 6px;
}

/* --- Submit button --- */
.form-submit-btn {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--accent-coral);
  border: none;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 24px rgba(255, 96, 68, 0.28);
}

.form-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.form-submit-btn:hover::before {
  left: 160%;
}

.form-submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(214, 106, 73, 0.35);
}

.form-submit-btn:active {
  transform: translateY(0);
}

.form-submit-btn:disabled {
  cursor: wait;
  opacity: 0.85;
}

.form-submit-btn svg {
  transition: transform 0.3s ease;
}

.form-submit-btn:hover svg {
  transform: translateX(5px);
}

/* --- Left side: status board card --- */
.status-board {
  position: relative;
  background: #FAF8F6;
  border: 1px solid var(--border-stone);
  border-radius: 18px;
  padding: 22px 24px;
  overflow: hidden;
}

.status-board::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-hover));
  opacity: 0.85;
}

.status-board-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-code);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-coral);
  margin-bottom: 14px;
}

.status-board-head::before {
  content: '// ';
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border-stone);
  font-family: var(--font-code);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.status-line:last-child {
  border-bottom: none;
}

.status-line .status-key {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-line .status-key::before {
  content: '> ';
  color: var(--accent-coral);
  font-weight: 700;
}

.status-line .status-value {
  color: var(--bg-espresso);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status-line .status-value.ok {
  color: #2F9E63;
}

.status-line .status-value.live {
  color: var(--accent-coral);
}

.status-line .status-value .blink {
  animation: pulse-dot 1.2s ease-in-out infinite;
}

/* --- Typing cursor on hero title --- */
.contact-text-left .typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.1em;
  background: var(--accent-coral);
  animation: pulse-dot 1s ease-in-out infinite;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .contact-split-wrapper {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .contact-card-form form {
    padding: 16px 18px 18px;
  }
}

/* --- Mobile: compact form card --- */
@media (max-width: 768px) {
  .contact-card-form {
    border-radius: 16px;
  }

  .contact-card-form form {
    padding: 12px 14px 14px;
  }

  .form-window-bar {
    padding: 8px 14px;
    font-size: 0.68rem;
  }

  .window-dots span {
    width: 8px;
    height: 8px;
  }

  .form-progress {
    height: 4px;
  }

  .form-group {
    margin-bottom: 8px;
  }

  .form-label {
    font-size: 0.6rem;
    margin-bottom: 4px;
    gap: 6px;
  }

  .form-control {
    padding: 7px 11px;
    font-size: 0.84rem;
    border-radius: 8px;
  }

  textarea.form-control {
    min-height: 48px;
  }

  .char-counter {
    margin-top: 4px;
    font-size: 0.6rem;
  }

  .form-submit-btn {
    padding: 10px 16px;
    font-size: 0.82rem;
    border-radius: 10px;
  }

  .form-console {
    padding: 6px 14px;
    min-height: 30px;
    font-size: 0.66rem;
  }

  .input-wrap::after {
    right: 11px;
    width: 6px;
    height: 6px;
  }

  .status-board {
    padding: 16px 18px;
  }

  .status-line {
    padding: 7px 0;
    font-size: 0.7rem;
  }
}
