/**
 * IGRAPH MEDIA — REFINED CONTACT SECTION & FORM STYLES
 * Precision-engineered, luxury dark glassmorphism, WCAG AA contrast.
 */

:root {
  --c-field: #131418;
  --c-field-hover: #17181D;
  --c-field-focus: #181920;
  --c-border: rgba(255, 255, 255, 0.10);
  --c-border-hover: rgba(255, 255, 255, 0.20);
  --c-focus: #B70909;
  --c-focus-glow: rgba(183, 9, 9, 0.25);
  --c-text: #F4F4F5;
  --c-label: #D4D4D8;
  --c-muted: #A1A1AA;
  --c-placeholder: #52525B;
  --c-error: #F87171;
  --c-error-glow: rgba(248, 113, 113, 0.18);
  --c-card-bg: linear-gradient(180deg, #0E0F12 0%, #08090A 100%);
  --c-card-border: rgba(255, 255, 255, 0.08);
}

/* ===== CONTACT SECTION CONTAINER ===== */
.contact-section {
  position: relative;
  background: #000000;
  padding: 104px 0 112px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

/* Atmospheric Ambient Glow */
.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 420px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(183, 9, 9, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.contact-section .container {
  position: relative;
  z-index: 1;
}

/* Section Header (Prestige Intro) */
.contact-section-header {
  max-width: 680px;
  margin: 0 auto 52px;
  text-align: center;
}

.contact-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(183, 9, 9, 0.10);
  border: 1px solid rgba(183, 9, 9, 0.25);
  color: #ff5252;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.contact-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #B70909;
  box-shadow: 0 0 8px rgba(183, 9, 9, 0.8);
}

.contact-section-title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #ffffff;
  margin: 0 0 16px;
}

.contact-section-subtitle {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: #A1A1AA;
  margin: 0;
}

/* Two-Column Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

/* Info Panel and Form Card: Equal Visual Weight & Polished Surface */
.contact-info-panel,
.contact-form-card {
  position: relative;
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  border-radius: 20px;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 24px 48px -12px rgba(0, 0, 0, 0.7);
  transition: border-color 0.25s ease;
}

/* Top Hairline Light Reflection */
.contact-info-panel::before,
.contact-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 36px;
  right: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
  pointer-events: none;
}

/* ===== LEFT COLUMN: INFO PANEL ===== */
.contact-info-heading {
  font-family: var(--font-display, var(--font-sans));
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 16px;
}

.contact-info-body {
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: #A1A1AA;
  margin: 0 0 32px;
}

/* Check-List (Plain List, NOT Boxed) */
.contact-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  color: #E4E4E7;
}

.checklist-icon-wrap {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #25D366;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checklist-icon-svg {
  width: 12px;
  height: 12px;
}

/* Tappable Contact Links */
.contact-action-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.contact-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  color: #F4F4F5;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease;
}

.contact-link-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-link-arrow {
  color: #71717A;
  transition: transform 0.2s ease, color 0.2s ease;
  font-size: 14px;
}

.contact-link-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.20);
  color: #ffffff;
}

.contact-link-btn:hover .contact-link-arrow {
  color: #ffffff;
  transform: translateX(3px);
}

.contact-link-btn:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

/* WhatsApp Accent Button */
.contact-link-whatsapp {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.10) 0%, rgba(37, 211, 102, 0.03) 100%);
  border-color: rgba(37, 211, 102, 0.28);
  color: #25D366;
}

.contact-link-whatsapp .contact-link-arrow {
  color: rgba(37, 211, 102, 0.6);
}

.contact-link-whatsapp:hover {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.18) 0%, rgba(37, 211, 102, 0.06) 100%);
  border-color: rgba(37, 211, 102, 0.45);
  color: #25D366;
}

.contact-link-whatsapp:hover .contact-link-arrow {
  color: #25D366;
}

/* Optional Testimonial Slot */
.contact-testimonial-slot {
  margin-top: 12px;
  margin-bottom: 24px;
}

/* Footnote */
.contact-info-footnote {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footnote-shield-icon {
  color: #22C55E;
  flex-shrink: 0;
}

/* ===== RIGHT COLUMN: THE FORM ===== */
#contact-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#contact-form .field {
  margin-bottom: 20px;
}

#contact-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}

#contact-form .field-row .field {
  margin-bottom: 20px;
}

#contact-form label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--c-label);
  margin-bottom: 8px;
  display: block;
}

#contact-form .optional {
  font-weight: 400;
  color: #71717A;
}

#contact-form .req {
  color: var(--c-focus);
  margin-left: 2px;
}

#contact-form input,
#contact-form select,
#contact-form textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  background: var(--c-field);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 16px; /* Prevents iOS auto-zoom */
  line-height: 1.4;
  transition: all 0.18s ease;
  box-sizing: border-box;
}

#contact-form input:hover,
#contact-form select:hover,
#contact-form textarea:hover {
  background: var(--c-field-hover);
  border-color: var(--c-border-hover);
}

#contact-form input:focus-visible,
#contact-form select:focus-visible,
#contact-form textarea:focus-visible {
  background: var(--c-field-focus);
  border-color: var(--c-focus);
  box-shadow: 0 0 0 3px var(--c-focus-glow), 0 2px 8px rgba(0, 0, 0, 0.4);
  outline: none;
}

#contact-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px;
  padding-right: 48px;
}

#contact-form select option {
  background: #131418;
  color: #F4F4F5;
  padding: 12px;
}

#contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

#contact-form ::placeholder {
  color: var(--c-placeholder);
  opacity: 1;
}

#contact-form [aria-invalid="true"] {
  border-color: var(--c-error) !important;
  box-shadow: 0 0 0 3px var(--c-error-glow) !important;
}

#contact-form .error {
  color: var(--c-error);
  font-size: 12.5px;
  line-height: 1.4;
  margin: 6px 0 0;
  display: block;
}

#contact-form .error[hidden] {
  display: none !important;
}

/* Honeypot field */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

/* Flagship Submit Button */
#contact-form .btn-primary {
  width: 100%;
  min-height: 52px;
  padding: 16px 28px;
  background: linear-gradient(135deg, #cf1111 0%, #B70909 50%, #8f0606 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-icon-gap, 10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 24px -4px rgba(183, 9, 9, 0.55);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease;
  margin-top: 8px;
  white-space: normal;
  text-align: center;
}

#contact-form .btn-primary:hover:not([disabled]) {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #e01515 0%, #cf1111 50%, #9e0808 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 12px 28px -4px rgba(183, 9, 9, 0.70);
}

#contact-form .btn-primary:active:not([disabled]) {
  transform: translateY(0);
}

#contact-form .btn-primary:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

#contact-form .btn-primary[disabled] {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.btn-arrow-icon {
  font-size: 16px;
  transition: transform 0.2s ease;
}

#contact-form .btn-primary:hover:not([disabled]) .btn-arrow-icon {
  transform: translateX(3px);
}

.form-note {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 12px;
  text-align: center;
  line-height: 1.5;
}

#form-status {
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

/* Modal-Grade Success Card */
.form-success-card {
  padding: 40px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 400px;
  justify-content: center;
}

.form-success-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.40);
  color: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(37, 211, 102, 0.25);
  margin-bottom: 8px;
}

.form-success-heading {
  font-family: var(--font-display, var(--font-sans));
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
}

.form-success-text {
  font-family: var(--font-sans);
  font-size: 15.5px;
  color: #A1A1AA;
  line-height: 1.6;
  max-width: 420px;
  margin: 0;
}

.form-success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin-top: 12px;
}

.form-reset-link {
  background: transparent;
  border: none;
  color: var(--c-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
  transition: color 0.15s ease;
}

.form-reset-link:hover {
  color: #ffffff;
}

/* Error Banner */
.form-error-banner {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  padding: 16px;
  color: #FCA5A5;
  font-size: 14px;
}

.form-error-banner a {
  color: #25D366;
  text-decoration: underline;
  font-weight: 600;
}

/* ===== TOP BAR & NAVIGATION ACCESSIBILITY ===== */
.address-bar a,
.address-bar span,
.topbar a,
.topbar span {
  color: #9CA3AF !important;
}

.address-bar a:hover,
.topbar a:hover {
  color: #ffffff !important;
}

/* Nav Active Page Indicator */
nav a[aria-current="page"],
.nav-link[aria-current="page"],
.mobile-nav-link[aria-current="page"] {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
}

/* ===== CHAT LAUNCHER OVERLAP COLLISION GUARD ===== */
body.form-active .chat-launcher,
body.form-active .igraph-chat-launcher {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease;
}

.igraph-chat-launcher {
  bottom: max(var(--btn-edge, 16px), env(safe-area-inset-bottom)) !important;
  right: max(var(--btn-edge, 16px), env(safe-area-inset-right)) !important;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 900px) {
  .contact-section {
    padding: 72px 0 80px;
  }
  .contact-section-title {
    font-size: 32px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contact-info-panel,
  .contact-form-card {
    padding: 32px 24px;
    border-radius: 16px;
  }
  #contact-form .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  #contact-form .btn-primary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
