/* ============================================================
   CONTACT PAGE - Frontora AI V2-Pre (2-col layout)
   ============================================================ */

/* ---------- HERO ---------- */
.contact-hero {
  position: relative;
  padding: clamp(80px, 11vw, 120px) 0 clamp(60px, 8vw, 90px);
  background:
    radial-gradient(ellipse 70% 60% at 80% 30%, rgba(16,185,129,0.08), transparent 60%),
    var(--neutral-0);
  overflow: hidden;
}

.contact-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.contact-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(16,185,129,0.1);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 20px;
}

.contact-h1 {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--neutral-900);
}

.contact-h1-accent {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.contact-lede {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--neutral-700, #404040);
  margin: 0 0 24px;
  max-width: 560px;
}

.contact-quick-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: inherit;
  color: var(--brand-600);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
}

.contact-quick-link:hover { color: var(--brand-700); }

/* ============================================================
   HERO VISUAL - Animated call routing flow
   ============================================================ */
.contact-hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.contact-flow {
  position: relative;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Node base */
.cf-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.08);
  z-index: 2;
}

.cf-node-call {
  align-self: flex-start;
  margin-left: 0;
}

.cf-node-mia {
  align-self: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.3);
}

.cf-node-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(16,185,129,0.12);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cf-node-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cf-node-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.cf-node-sub {
  font-size: 12px;
  opacity: 0.7;
  line-height: 1.2;
}

.cf-node-mia .cf-node-sub { color: rgba(255,255,255,0.85); opacity: 1; }

/* Pulse ring on incoming call */
.cf-pulse-ring {
  position: absolute;
  top: 50%;
  left: 32px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--brand-500);
  transform: translateY(-50%);
  opacity: 0;
  animation: cf-pulse 2s ease-out infinite;
}

@keyframes cf-pulse {
  0% { transform: translateY(-50%) scale(0.8); opacity: 0.7; }
  100% { transform: translateY(-50%) scale(2); opacity: 0; }
}

/* Mia avatar with sound waves */
.cf-mia-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  position: relative;
}

.cf-mia-wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5px;
}

.cf-mia-wave span {
  display: block;
  width: 2px;
  background: white;
  border-radius: 2px;
  animation: cf-wave 0.9s ease-in-out infinite;
}

.cf-mia-wave span:nth-child(1) { height: 6px; animation-delay: 0s; }
.cf-mia-wave span:nth-child(2) { height: 12px; animation-delay: 0.15s; }
.cf-mia-wave span:nth-child(3) { height: 8px; animation-delay: 0.3s; }
.cf-mia-wave span:nth-child(4) { height: 14px; animation-delay: 0.45s; }

.cf-mia-avatar > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0;
}

/* Show "M" when not animating, hide when waveform active */
@keyframes cf-wave {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

/* Vertical connector line */
.cf-connector {
  width: 2px;
  height: 50px;
  background: linear-gradient(to bottom, transparent 0%, var(--brand-500) 30%, var(--brand-500) 70%, transparent 100%);
  position: relative;
  overflow: hidden;
}

.cf-connector::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -3px;
  width: 8px;
  height: 8px;
  background: var(--brand-500);
  border-radius: 50%;
  animation: cf-flow-down 2s ease-in-out infinite;
}

@keyframes cf-flow-down {
  0% { top: -10px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Fan diagram (3 lines from Mia to outcomes) */
.cf-fan {
  width: 100%;
  height: 70px;
  margin-top: -2px;
}

.cf-fan svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cf-fan-line {
  fill: none;
  stroke: var(--brand-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 4 4;
  opacity: 0.5;
  animation: cf-dash 1.5s linear infinite;
}

.cf-fan-line:nth-child(2) { animation-delay: 0.2s; }
.cf-fan-line:nth-child(3) { animation-delay: 0.4s; }

@keyframes cf-dash {
  to { stroke-dashoffset: -16; }
}

/* Outcome chips */
.cf-outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: -8px;
}

.cf-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-800);
  box-shadow: 0 2px 8px -2px rgba(0,0,0,0.05);
  animation: cf-chip-in 0.6s ease forwards;
  opacity: 0;
}

.cf-chip-1 { animation-delay: 0.5s; color: var(--brand-700); border-color: rgba(16,185,129,0.3); }
.cf-chip-2 { animation-delay: 0.7s; }
.cf-chip-3 { animation-delay: 0.9s; }

.cf-chip svg { color: var(--brand-600); flex-shrink: 0; }

@keyframes cf-chip-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FORM SECTION - 2 column
   ============================================================ */
.contact-form-section {
  background: var(--neutral-100, #f5f5f5);
  padding: clamp(60px, 8vw, 100px) 0;
  scroll-margin-top: 80px;
}

.contact-form-header {
  text-align: center;
  margin-bottom: clamp(32px, 4vw, 48px);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.contact-h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  color: var(--neutral-900);
}

.contact-form-sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--neutral-600);
  margin: 0;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

/* ---------- LEFT COL - method cards ---------- */
.contact-methods-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
}

.contact-method-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-method-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(16,185,129,0.15);
  border-color: var(--brand-200, rgba(16,185,129,0.3));
}

.contact-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.contact-method-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--neutral-900);
  line-height: 1.25;
}

.contact-method-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--neutral-600);
  margin: 0 0 12px;
}

.contact-method-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-600);
  text-decoration: none;
}
.contact-method-link:hover { color: var(--brand-700); }

/* ---------- RIGHT COL - form ---------- */
.contact-form-col { width: 100%; }

.contact-form {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  padding: clamp(24px, 3.5vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

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

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-field[data-show-for] { display: none; }
.contact-field[data-show-for].is-visible {
  display: flex;
  animation: cf-fade-in 0.25s ease;
}

@keyframes cf-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.contact-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-field-row[data-show-for] { display: none; }
.contact-field-row[data-show-for].is-visible {
  display: grid;
  animation: cf-fade-in 0.25s ease;
}

.contact-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-800, #262626);
}

.contact-req { color: var(--brand-600); }
.contact-help { color: var(--neutral-500); font-weight: 400; font-size: 12px; }

.contact-field input[type="text"],
.contact-field input[type="email"],
.contact-field input[type="tel"],
.contact-field select,
.contact-field textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--neutral-300, #d4d4d4);
  border-radius: 8px;
  color: var(--neutral-900);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

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

.contact-help-text {
  font-size: 11px;
  color: var(--neutral-500);
  text-align: right;
}

/* Consent */
.contact-consent {
  padding: 12px;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
}

.contact-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.5;
  color: var(--neutral-700);
}

.contact-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--brand-500);
  flex-shrink: 0;
}

.contact-checkbox-label a { color: var(--brand-600); text-decoration: underline; }
.contact-checkbox-label a:hover { color: var(--brand-700); }

/* Submit */
.contact-submit-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.cf-submit-spinner svg { animation: cf-spin 1s linear infinite; }
@keyframes cf-spin { to { transform: rotate(360deg); } }

.contact-status { flex: 1; font-size: 13px; font-weight: 500; }
.contact-status.is-success { color: var(--brand-700); }
.contact-status.is-error { color: #dc2626; }

#cf_submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- ALT CONTACT INFO ---------- */
.contact-alt {
  background: var(--neutral-950, #0a0a0a);
  color: white;
  padding: clamp(60px, 8vw, 90px) 0;
}

.contact-alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.contact-alt-card {
  padding: 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}

.contact-alt-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  color: white;
}

.contact-alt-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--neutral-300, #d4d4d4);
  margin: 0;
}

.contact-alt-link {
  color: var(--brand-500);
  text-decoration: underline;
  font-weight: 500;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  cursor: pointer;
}

.contact-alt-link:hover { color: white; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .contact-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-hero-visual { min-height: 360px; }

  .contact-form-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contact-methods-col { position: static; }
}

@media (max-width: 640px) {
  .contact-field-row { grid-template-columns: 1fr; }
  .contact-h1 { font-size: 36px; }
  .contact-h2 { font-size: 26px; }
  .contact-quick-links { flex-direction: column; gap: 12px; }
  .cf-outcomes { gap: 8px; }
  .cf-chip { padding: 8px 4px; font-size: 11px; }
  .contact-flow { max-width: 320px; }
}

/* ============================================================
   BASH 1587: CLEAN 2-row chip layout + visible gold fan lines
   ============================================================ */

/* Container is now an explicit 2-row layout via flex column with 2 inner flex rows */
/* But since HTML is one container, use grid with explicit row mapping */

.cf-outcomes {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr); /* 6-column base for flex centering */
  gap: 12px 8px;
  width: 100%;
  margin-top: 0;
}

/* Row 1: 3 chips, each spans 2 of 6 columns */
.cf-chip-1 { grid-column: 1 / 3; grid-row: 1; }
.cf-chip-2 { grid-column: 3 / 5; grid-row: 1; }
.cf-chip-3 { grid-column: 5 / 7; grid-row: 1; }

/* Row 2: 2 chips, centered (each spans 2 cols, with 1 col padding on either side) */
.cf-chip-4 { grid-column: 2 / 4; grid-row: 2; }
.cf-chip-5 { grid-column: 4 / 6; grid-row: 2; }

/* Animation delays for new chips */
.cf-chip-4 { animation-delay: 1.1s; }
.cf-chip-5 { animation-delay: 1.3s; }

/* Gold variant for chips 4 + 5 */
.cf-chip-gold {
  color: #c4a35a !important;
  border-color: rgba(196,163,90,0.35) !important;
  background: linear-gradient(135deg, rgba(196,163,90,0.08), rgba(196,163,90,0.02)) !important;
  box-shadow: 0 2px 8px -2px rgba(196,163,90,0.15) !important;
}

.cf-chip-gold svg {
  color: #c4a35a !important;
}

@keyframes cf-gold-glow {
  0%, 100% { box-shadow: 0 2px 8px -2px rgba(196,163,90,0.15); }
  50% { box-shadow: 0 4px 14px -2px rgba(196,163,90,0.35); }
}

.cf-chip-gold {
  animation: cf-chip-in 0.6s ease forwards, cf-gold-glow 3s ease-in-out 2s infinite;
}

/* SVG fan must be tall enough to show ALL 5 paths (160 viewBox -> 130px height) */
.cf-fan {
  width: 100%;
  position: relative;
  margin-top: 4px;
}

.cf-fan svg {
  width: 100%;
  height: 130px !important; /* enough to render the row 2 fan lines */
  display: block;
  overflow: visible;
}

/* Gold fan lines - clearly visible */
.cf-fan-line-gold {
  stroke: #c4a35a !important;
  stroke-opacity: 0.6;
  stroke-dasharray: 4 4 !important;
}

.cf-fan-line-4 { animation-delay: 0.6s; }
.cf-fan-line-5 { animation-delay: 0.8s; }

/* ===== MOBILE ===== */
@media (max-width: 700px) {
  .cf-outcomes {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
  .cf-chip-1 { grid-column: 1 / -1; grid-row: 1; }
  .cf-chip-2 { grid-column: 1; grid-row: 2; }
  .cf-chip-3 { grid-column: 2; grid-row: 2; }
  .cf-chip-4 { grid-column: 1; grid-row: 3; }
  .cf-chip-5 { grid-column: 2; grid-row: 3; }

  /* On mobile, hide the fan SVG (chips speak for themselves) */
  .cf-fan svg {
    display: none;
  }

  .cf-fan {
    height: 12px;
  }
}

@media (max-width: 480px) {
  .cf-chip {
    font-size: 11.5px !important;
    padding: 8px 6px !important;
  }
  .cf-chip svg {
    width: 12px !important;
    height: 12px !important;
  }
}
