/* ==========================================================================
   ASHX DIGITAL: CONTACT PAGE STYLESHEET (CONTACT.CSS)
   Implements CONTACT_CONTENT_BLUEPRINT.md, CONTACT_WIREFRAME.md,
   and visual hierarchy rules from DESIGN_SYSTEM.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CONTACT HERO & ENGAGEMENT TRACKER
   -------------------------------------------------------------------------- */
.contact-hero {
  padding-top: clamp(140px, 15vw, 190px);
  padding-bottom: clamp(40px, 5vw, 70px);
  position: relative;
  overflow: hidden;
}

.contact-hero__inner {
  max-width: 980px;
}

.contact-status-bar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(18, 24, 38, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--text-secondary);
  margin-top: var(--space-lg);
}

.contact-status-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success, #10B981);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  animation: pulse 2.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --------------------------------------------------------------------------
   2. DUAL INTAKE PATHWAY SELECTOR (SEGMENTED TABS)
   -------------------------------------------------------------------------- */
.contact-tabs-container {
  display: flex;
  justify-content: center;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.contact-tabs-pill {
  display: inline-flex;
  padding: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  gap: 6px;
  max-width: 100%;
}

.contact-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-fast) cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.contact-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.contact-tab-btn.active {
  color: #050810;
  background: var(--accent-electric);
  border-color: var(--accent-electric);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
}

.contact-tab-btn.active .tab-icon {
  fill: #050810;
}

.tab-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: fill var(--duration-fast) ease;
}

/* --------------------------------------------------------------------------
   3. CONVERSION STAGE (12-COL ASYMMETRIC SPLIT)
   -------------------------------------------------------------------------- */
.contact-stage {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  margin-bottom: var(--space-4xl);
}

.contact-pane {
  display: none;
}

.contact-pane.active {
  display: block;
  animation: fadeInPane 0.35s ease-out forwards;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   4. STRUCTURED PROJECT BRIEF FORM CARD
   -------------------------------------------------------------------------- */
.contact-card {
  background: rgba(18, 24, 38, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(24px, 4vw, 44px);
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-electric), transparent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.contact-form-section {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-form-section:last-of-type {
  border-bottom: none;
  margin-bottom: var(--space-lg);
  padding-bottom: 0;
}

.form-section-title {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--accent-electric);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Service Chips (Multi-Select) */
.service-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.service-chip-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: var(--text-small);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all var(--duration-fast) ease;
}

.service-chip-label:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: rgba(56, 189, 248, 0.3);
}

.service-chip-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-custom-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--text-muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) ease;
  flex-shrink: 0;
}

.chip-custom-box svg {
  display: none;
  width: 10px;
  height: 10px;
  fill: #050810;
}

.service-chip-checkbox:checked + .service-chip-label {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-electric);
  color: var(--text-primary);
}

.service-chip-checkbox:checked + .service-chip-label .chip-custom-box {
  background: var(--accent-electric);
  border-color: var(--accent-electric);
}

.service-chip-checkbox:checked + .service-chip-label .chip-custom-box svg {
  display: block;
}

.service-chip-checkbox:focus-visible + .service-chip-label {
  outline: 2px solid var(--accent-electric);
  outline-offset: 2px;
}

/* Budget Tier Radios */
.budget-tiers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.budget-tier-label {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.budget-tier-label:hover {
  background: var(--bg-elevated);
  border-color: rgba(56, 189, 248, 0.3);
}

.budget-tier-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.budget-tier-amount {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--text-primary);
}

.budget-tier-context {
  font-size: var(--text-caption);
  color: var(--text-muted);
  margin-top: 2px;
}

.budget-tier-radio:checked + .budget-tier-label {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-electric);
}

.budget-tier-radio:checked + .budget-tier-label .budget-tier-amount {
  color: var(--accent-electric);
}

.budget-tier-radio:focus-visible + .budget-tier-label {
  outline: 2px solid var(--accent-electric);
  outline-offset: 2px;
}

/* Standard Inputs & Labels */
.form-group-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.form-group {
  margin-bottom: var(--space-md);
  position: relative;
}

.form-label {
  display: block;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-label span.req {
  color: var(--accent-electric);
  margin-left: 2px;
}

.contact-input,
.contact-textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem; /* 16px to prevent iOS auto-zoom */
  color: var(--text-primary);
  transition: all var(--duration-fast) ease;
  line-height: 1.5;
}

.contact-input:focus,
.contact-textarea:focus {
  outline: none;
  border-color: var(--accent-electric);
  background: rgba(12, 18, 30, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: var(--text-muted);
}

.contact-textarea {
  min-height: 130px;
  resize: vertical;
}

/* Inline Field Errors */
.field-error-msg {
  display: none;
  font-size: var(--text-caption);
  color: #F87171;
  margin-top: 4px;
  font-family: var(--font-mono);
}

.has-error .contact-input,
.has-error .contact-textarea {
  border-color: #F87171;
  background: rgba(239, 68, 68, 0.05);
}

.has-error .field-error-msg {
  display: block;
}

/* Honeypot hidden input for spam bots */
.contact-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Submit Button & Reassurance */
.form-action-strip {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.btn-submit-brief {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 28px;
  background: var(--accent-electric);
  color: #050810;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  border: 1px solid var(--accent-electric);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-submit-brief:hover {
  background: #7DD3FC;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.4);
}

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

.btn-submit-brief:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-privacy-reassurance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: var(--text-caption);
  color: var(--text-muted);
  text-align: center;
}

.form-privacy-reassurance svg {
  width: 14px;
  height: 14px;
  fill: var(--accent-electric);
  flex-shrink: 0;
}

/* Submission Result States */
.form-success-banner {
  display: none;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  animation: fadeInPane 0.4s ease-out forwards;
}

.form-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  color: var(--success);
}

.form-success-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* --------------------------------------------------------------------------
   5. MODE 2: INSTANT CALENDAR DISCOVERY BOOKING
   -------------------------------------------------------------------------- */
.calendar-card {
  background: rgba(18, 24, 38, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  position: relative;
}

.calendar-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-electric), transparent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.cal-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 12px;
}

.cal-duration-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--accent-electric);
}

.cal-booking-widget {
  min-height: 480px;
  background: rgba(8, 12, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cal-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: var(--space-md);
}

.cal-slot-btn {
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  cursor: pointer;
  text-align: center;
  transition: all var(--duration-fast) ease;
}

.cal-slot-btn:hover {
  border-color: var(--accent-electric);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-electric);
}

.cal-slot-btn.active {
  background: var(--accent-electric);
  border-color: var(--accent-electric);
  color: #050810;
  font-weight: 700;
}

.cal-embed-placeholder {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--text-small);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   6. RIGHT RAIL: CONTEXT, DIRECT CHANNELS & PROOF
   -------------------------------------------------------------------------- */
.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.sidebar-box {
  background: rgba(18, 24, 38, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  backdrop-filter: blur(12px);
}

.sidebar-box-title {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--accent-electric);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.channel-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) ease;
  text-decoration: none;
}

.channel-item:hover {
  background: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.25);
  transform: translateX(4px);
}

.channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-electric);
  flex-shrink: 0;
}

.channel-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.channel-info-label {
  font-size: var(--text-caption);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.channel-info-val {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
  word-break: break-all;
}

/* Trust Pillar Items */
.trust-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.trust-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.trust-check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

.trust-check-icon svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.trust-check-text {
  font-size: var(--text-small);
  color: var(--text-secondary);
  line-height: 1.5;
}

.trust-check-text strong {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   7. "WHAT HAPPENS NEXT" 3-STEP ONBOARDING ROADMAP
   -------------------------------------------------------------------------- */
.sla-section {
  padding: var(--space-4xl) 0;
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.sla-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
  position: relative;
}

.sla-card {
  background: rgba(18, 24, 38, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  position: relative;
  transition: all var(--duration-normal) ease;
}

.sla-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(18, 24, 38, 0.8);
  transform: translateY(-4px);
}

.sla-number {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.12);
  margin-bottom: var(--space-sm);
  transition: color var(--duration-fast) ease;
}

.sla-card:hover .sla-number {
  color: var(--accent-electric);
}

.sla-timing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--accent-electric);
  margin-bottom: var(--space-md);
}

.sla-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.sla-desc {
  font-size: var(--text-small);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   8. PRE-ENGAGEMENT FAQ ACCORDION
   -------------------------------------------------------------------------- */
.contact-faq-section {
  padding-bottom: var(--space-4xl);
}

.contact-faq-list {
  max-width: 860px;
  margin: var(--space-2xl) auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-faq-item {
  background: rgba(18, 24, 38, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--duration-fast) ease;
}

.contact-faq-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.contact-faq-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color var(--duration-fast) ease;
}

.contact-faq-trigger:hover {
  color: var(--accent-electric);
}

.contact-faq-trigger:focus-visible {
  outline: 2px solid var(--accent-electric);
  outline-offset: -2px;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-normal) cubic-bezier(0.16, 1, 0.3, 1);
  fill: var(--text-muted);
  flex-shrink: 0;
}

.contact-faq-trigger[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  fill: var(--accent-electric);
}

.contact-faq-content {
  display: none;
  padding: 0 24px 24px;
  color: var(--text-secondary);
  font-size: var(--text-small);
  line-height: 1.7;
}

.contact-faq-trigger[aria-expanded="true"] + .contact-faq-content {
  display: block;
  animation: fadeInPane 0.25s ease-out forwards;
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .contact-stage {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .sla-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 640px) {
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .budget-tiers-grid {
    grid-template-columns: 1fr;
  }

  .service-chips-grid {
    grid-template-columns: 1fr;
  }

  .contact-tabs-pill {
    width: 100%;
    flex-direction: column;
  }

  .contact-tab-btn {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   10. PREFERS-REDUCED-MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .contact-status-pulse {
    animation: none;
  }
  .contact-pane.active,
  .form-success-banner,
  .contact-faq-trigger[aria-expanded="true"] + .contact-faq-content {
    animation: none;
  }
  .channel-item:hover,
  .sla-card:hover,
  .btn-submit-brief:hover {
    transform: none;
  }
}
