/*
 * Quark 2 — user customizations
 *
 * This file is safe to edit. It is loaded last so anything here overrides
 * theme.css without having to mark rules !important.
 */

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--q2-accent, #333333);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
  padding: 0;
  outline: none;
}

[data-theme='dark'] .back-to-top {
  background: rgba(18, 18, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  color: var(--q2-accent, #ffffff);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] .back-to-top:hover {
  background: rgba(28, 28, 28, 0.8);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.back-to-top:active {
  transform: translateY(-2px) scale(0.96);
}

.back-to-top:focus-visible {
  box-shadow: 0 0 0 3px var(--q2-focus-ring, rgba(0, 122, 204, 0.4));
}

/* Progress SVG */
.back-to-top-progress {
  position: absolute;
  top: -1px;
  left: -1px;
  transform: rotate(-90deg);
  width: 48px;
  height: 48px;
  pointer-events: none;
}

.back-to-top-progress-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.03);
  stroke-width: 2.5;
}

[data-theme='dark'] .back-to-top-progress-bg {
  stroke: rgba(255, 255, 255, 0.03);
}

.back-to-top-progress-fill {
  fill: none;
  stroke: var(--q2-accent, #333333);
  stroke-width: 2.5;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.08s linear;
}

.back-to-top-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.back-to-top:hover .back-to-top-icon {
  transform: translateY(-2px);
}

/* Contact Form Styling */
.modular-row.form {
  max-width: 650px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.modular-row.form h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  color: var(--q2-text, #111111);
}

.modular-row.form p {
  color: var(--q2-text-light, #666666);
  margin-bottom: 2.5rem;
}

/* Form Field Layout */
.modular-row.form form .form-field {
  margin-bottom: 1.5rem;
}

.modular-row.form form .form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--q2-text, #333333);
}

/* Input Styles */
.modular-row.form form input[type="text"],
.modular-row.form form input[type="email"],
.modular-row.form form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--q2-text, #111111);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme='dark'] .modular-row.form form input[type="text"],
[data-theme='dark'] .modular-row.form form input[type="email"],
[data-theme='dark'] .modular-row.form form textarea {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #1a1a1a;
  color: #ffffff;
}

.modular-row.form form input[type="text"]:focus,
.modular-row.form form input[type="email"]:focus,
.modular-row.form form textarea:focus {
  outline: none;
  border-color: var(--q2-accent, #6f42c1);
  box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.15);
}

/* Button & Captcha Styles */
.modular-row.form form .form-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}

.modular-row.form form .btn-primary {
  background-color: var(--q2-accent, #6f42c1);
  color: #ffffff;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.modular-row.form form .btn-primary:hover {
  background-color: var(--q2-accent-hover, #5a32a3);
  transform: translateY(-1px);
}

.modular-row.form form .btn-primary:active {
  transform: translateY(0);
}

/* Async Modal Overlay */
.form-async-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-async-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.form-async-modal {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 320px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-async-modal-overlay.active .form-async-modal {
  transform: scale(1);
}

[data-theme='dark'] .form-async-modal {
  background: #1e1e1e;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Spinner */
.form-async-spinner {
  width: 48px;
  height: 48px;
  border: 3.5px solid rgba(111, 66, 193, 0.15);
  border-top-color: var(--q2-accent, #6f42c1);
  border-radius: 50%;
  animation: form-async-spin 0.8s linear infinite;
}

.form-async-message {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--q2-text, #111111);
  margin: 0;
}

[data-theme='dark'] .form-async-message {
  color: #ffffff;
}

@keyframes form-async-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Accessibility & Motion Preference Rules */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Touch Target Accessibility Standard (min 44x44px) */
button, input[type="button"], input[type="submit"], .btn, .copy-btn {
  min-width: 44px;
  min-height: 44px;
}

/* Impeccable Centered Card Component */
.impeccable-card-wrapper {
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.impeccable-card {
  max-width: 540px;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.07),
              0 0 0 1px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='dark'] .impeccable-card {
  background: rgba(18, 18, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.05);
}

.impeccable-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.12);
}

[data-theme='dark'] .impeccable-card:hover {
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7);
}

.impeccable-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 9999px;
  margin-bottom: 1.75rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

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

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--q2-text, #111) 0%, #666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme='dark'] .card-title {
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--q2-text-light, #666666);
  margin-bottom: 2.25rem;
}

[data-theme='dark'] .card-description {
  color: #a1a1aa;
}

.card-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.875rem 2rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff !important;
  background: linear-gradient(135deg, #8428df 0%, #4f46e5 100%);
  border: none;
  border-radius: 9999px;
  text-decoration: none !important;
  box-shadow: 0 10px 25px -5px rgba(132, 40, 223, 0.4);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 35px -5px rgba(132, 40, 223, 0.55);
}

.card-btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.card-footer-info {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--q2-text-light, #71717a);
}

.email-address {
  font-family: monospace;
  font-size: 0.9rem;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
}

[data-theme='dark'] .email-address {
  background: rgba(255, 255, 255, 0.06);
  color: #d4d4d8;
}


