/* ============================================================
   contact-animations.css  |  Movina Values
   Link in contact.html <head> AFTER escripts.css
   ============================================================ */


/* ── 1. Scroll-reveal — JS opt-in (no flash on load) ── */
[data-reveal] {
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].reveal-ready         { opacity: 0; transform: translateY(32px); }
[data-reveal="left"].reveal-ready  { opacity: 0; transform: translateX(-44px); }
[data-reveal="right"].reveal-ready { opacity: 0; transform: translateX(44px); }
[data-reveal].is-visible           { opacity: 1 !important; transform: none !important; }
[data-delay="150"] { transition-delay: 0.15s; }
[data-delay="200"] { transition-delay: 0.20s; }


/* ── 2. Navbar scroll-shrink ── */
#navbar {
  transition: padding 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
#navbar.scrolled {
  padding: 4px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.97);
}


/* ── 3. Hero entrance (pure CSS — no JS dependency) ── */
.contact-hero-intro .brand-title {
  opacity: 0;
  animation: ct-up 0.7s 0.15s cubic-bezier(0.22,1,0.36,1) forwards;
}
.contact-hero-intro .tagline {
  opacity: 0;
  animation: ct-up 0.7s 0.32s cubic-bezier(0.22,1,0.36,1) forwards;
  position: relative;
  display: inline-block;
}
.contact-hero-intro .tagline::after {
  content: "";
  display: block;
  height: 4px; width: 0;
  background: #FAC60A;
  border-radius: 999px;
  margin: 10px auto 0;
  animation: ct-ul 0.9s 1.05s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes ct-ul { to { width: 60%; } }
.contact-hero-intro .description {
  opacity: 0;
  animation: ct-up 0.7s 0.48s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes ct-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}


/* ── 4. Info items stagger ── */
.info-item {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1),
              transform 0.55s cubic-bezier(0.22,1,0.36,1);
}
.info-item.is-visible { opacity: 1; transform: none; }

/* Icon circle pulse on hover */
.info-icon {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.3s ease;
  flex-shrink: 0;
}
.info-item:hover .info-icon {
  transform: scale(1.15);
  box-shadow: 0 8px 20px rgba(74,94,122,0.16);
}

/* Info text link style */
.info-text a {
  color: #4A5E7A;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}
.info-text a:hover { color: #FAC60A; }


/* ── 5. Social pills ── */
.contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.22s ease, border-color 0.22s ease,
              transform 0.22s ease, color 0.22s ease;
}
.social-pill:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
  transform: translateY(-3px);
}


/* ── 6. Form card glow on focus-within ── */
.contact-form-card {
  transition: box-shadow 0.35s ease;
}
.contact-form-card:focus-within {
  box-shadow: 0 20px 50px rgba(74,94,122,0.14),
              0 0 0 3px rgba(250,198,10,0.18);
}

/* Input & select focus ring */
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: #FAC60A;
  box-shadow: 0 0 0 3px rgba(250,198,10,0.18);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Input shake on invalid */
.input-group input.invalid,
.input-group select.invalid,
.input-group textarea.invalid {
  border-color: #E24B4A;
  animation: shake 0.4s cubic-bezier(0.36,0.07,0.19,0.97);
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* Field error text */
.field-error {
  display: block;
  font-size: 0.78rem;
  color: #E24B4A;
  margin-top: 5px;
  min-height: 18px;
  transition: opacity 0.2s ease;
}


/* ── 7. Submit button states ── */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  border: none;
  background: #1e293b;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-submit:hover {
  background: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30,41,59,0.22);
}
.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Spinner (hidden by default, shown during submit) */
.btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-submit.loading .btn-label { display: none; }
.btn-submit.loading .btn-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ── 8. Success state ── */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 32px 20px;
  animation: ct-up 0.6s cubic-bezier(0.22,1,0.36,1) forwards;
}
.form-success svg {
  animation: success-pop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes success-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.form-success h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
}
.form-success p {
  font-size: 0.95rem;
  color: #64748b;
}


/* ── 9. Footer — always visible, stagger is a bonus ── */
.footer-column {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.footer-column.stagger-ready {
  opacity: 0;
  transform: translateY(20px);
}
.footer-column.is-visible {
  opacity: 1 !important;
  transform: none !important;
}


/* ── 10. Ripple ── */
.ripple-btn { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%;
  transform: scale(0);
  animation: ct-ripple 0.55s linear;
  background: rgba(255,255,255,0.28);
  pointer-events: none;
}
@keyframes ct-ripple { to { transform: scale(4); opacity: 0; } }


/* ── 11. Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal], [data-reveal].reveal-ready,
  .contact-hero-intro .brand-title,
  .contact-hero-intro .tagline,
  .contact-hero-intro .description,
  .info-item, .footer-column {
    opacity: 1 !important;
    transform: none !important;
  }
}
