/* ============================================
   CONTACT MODAL — Portfolio Ines Capela
   ============================================ */

.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.contact-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.contact-card {
  width: 100%;
  max-width: 440px;
  margin: 1rem;
  padding: 2.5rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.15);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s ease;
}
.contact-overlay.visible .contact-card {
  transform: translateY(0) scale(1);
}

/* Header */
.contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}
.contact-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1a1e28;
}
.contact-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: #9ea2ab;
  transition: background-color 0.2s, color 0.2s;
}
.contact-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #1a1e28;
}
.contact-close svg {
  width: 18px;
  height: 18px;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.contact-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7d828c;
}
.contact-input,
.contact-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e4e9;
  border-radius: 0.5rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  color: #1a1e28;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.contact-input::placeholder,
.contact-textarea::placeholder {
  color: #c5c8cf;
}
.contact-input:focus,
.contact-textarea:focus {
  border-color: #2BA3B3;
  box-shadow: 0 0 0 3px rgba(43, 163, 179, 0.1);
}
.contact-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Submit */
.contact-submit {
  width: 100%;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 9999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background-color: #2BA3B3;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  margin-top: 0.5rem;
}
.contact-submit:hover {
  background-color: #238d9b;
}
.contact-submit:active {
  transform: scale(0.98);
}

/* Success state */
.contact-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 0;
}
.contact-success.visible {
  display: flex;
}
.contact-success-icon {
  width: 64px;
  height: 64px;
  color: #2BA3B3;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.contact-success-icon.animate {
  opacity: 1;
  transform: scale(1);
}
.contact-success-icon svg {
  width: 100%;
  height: 100%;
}
.contact-success-icon .check-circle {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 0.8s ease 0.2s;
}
.contact-success-icon.animate .check-circle {
  stroke-dashoffset: 0;
}
.contact-success-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1a1e28;
  margin-bottom: 0.5rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease 0.4s, transform 0.4s ease 0.4s;
}
.contact-success.visible .contact-success-title {
  opacity: 1;
  transform: translateY(0);
}
.contact-success-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  color: #7d828c;
  line-height: 1.5;
  max-width: 280px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease 0.55s, transform 0.4s ease 0.55s;
}
.contact-success.visible .contact-success-text {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Dark mode ---- */
html.dark .contact-overlay {
  background-color: rgba(0, 0, 0, 0.6);
}
html.dark .contact-card {
  background: #151820;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.5);
}
html.dark .contact-title {
  color: #f0f1f3;
}
html.dark .contact-close {
  color: #5e636e;
}
html.dark .contact-close:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #f0f1f3;
}
html.dark .contact-label {
  color: #5e636e;
}
html.dark .contact-input,
html.dark .contact-textarea {
  background: #0c0f14;
  border-color: rgba(255, 255, 255, 0.1);
  color: #f0f1f3;
}
html.dark .contact-input::placeholder,
html.dark .contact-textarea::placeholder {
  color: #5e636e;
}
html.dark .contact-input:focus,
html.dark .contact-textarea:focus {
  border-color: #4db3bb;
  box-shadow: 0 0 0 3px rgba(43, 163, 179, 0.15);
}
html.dark .contact-success-title {
  color: #f0f1f3;
}
html.dark .contact-success-text {
  color: #5e636e;
}
