/* Capnexis theme custom CSS (keyframes + fade-in animation state) */

/* Offset anchored sections so they don't land under the fixed header.
   The actual smooth-scroll animation is handled entirely by JS
   (main.js, via requestAnimationFrame) so it works consistently
   regardless of OS "reduce motion" settings or browser differences.
   scroll-margin-top here only affects the target landing position. */
section[id] {
  scroll-margin-top: 64px;
}
@media (min-width: 768px) {
  section[id] {
    scroll-margin-top: 80px;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinRev {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.cap-ring {
  padding: 1px;
  background: linear-gradient(135deg, rgba(53, 70, 86, 0.03) 0%, rgba(61, 184, 172, 0.6) 50%, rgba(53, 70, 86, 0.03) 100%);
}
.cap-ring-1 { width: 120vmin; height: 120vmin; animation: spin 45s linear infinite; }
.cap-ring-2 { width: 85vmin;  height: 85vmin;  animation: spinRev 35s linear infinite; }
.cap-ring-3 { width: 50vmin;  height: 50vmin;  animation: spin 25s linear infinite; }

/* Fade-in on scroll (mirrors the original FadeIn.tsx component) */
.cap-fade {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.cap-fade.cap-fade-left {
  transform: translateX(-2.5rem);
}
.cap-fade.cap-visible {
  opacity: 1;
  transform: translate(0, 0);
}

#cap-navbar.cap-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* ------------------------------------------------------------------
 * Contact Form 7 - matches the site's existing input/button styling.
 * CF7's own shortcode options can't safely carry Tailwind's bracket
 * syntax (e.g. tracking-[0.02em]), since a stray "]" can prematurely
 * close the CF7 tag. So CF7 fields use these plain classes instead,
 * defined here to look identical to the rest of the form.
 * ---------------------------------------------------------------- */
.wpcf7-form {
  margin: 0;
}
.cap-input,
.cap-textarea {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #E2E8F0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #2B3A4A;
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
@media (min-width: 768px) {
  .cap-input,
  .cap-textarea {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
}
.cap-input:focus,
.cap-textarea:focus {
  outline: none;
  border-color: #3ABFBF;
  box-shadow: 0 0 0 2px rgba(58, 191, 191, 0.3);
}
.cap-textarea {
  resize: none;
}

.cap-submit {
  width: 100%;
  background-color: #3ABFBF;
  color: #fff;
  padding: 1rem 3.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}
@media (min-width: 640px) {
  .cap-submit { width: auto; }
}
@media (min-width: 768px) {
  .cap-submit { padding: 1.25rem 3.5rem; font-size: 1.125rem; }
}
.cap-submit:hover {
  background-color: #2C7A7B;
  transform: translateY(-4px);
}
.cap-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.wpcf7-form .wpcf7-not-valid-tip {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 0.375rem;
  display: block;
}
.wpcf7-form-control-wrap {
  display: block;
}

.wpcf7-response-output {
  margin: 1.5rem 0 0 !important;
  padding: 1rem 1.25rem !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem;
}
.wpcf7-mail-sent-ok {
  color: #15803d !important;
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
}
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng,
.wpcf7-spam-blocked,
.wpcf7-acceptance-missing {
  color: #b91c1c !important;
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
}
